MICRO JOURMV
$2.95
USA
6B000
HDH Part 3 p. 25
6B000 User notes p. 20
BB09
"C" User notes p. 16
FLEX User notes p. 7
05-9 User notes p. 12
Tandg CoCo User notes p. 35
VOLUME Vll ISSUE VII • Devoted to the 68XX user • July 1985
"Small Computers Doing Big Things"
-TV\£ 68XX US ^
:
y ■
iTVMAl
r*U70'h2810 N
!S
.3*
WE DON'T PLAY GAMES
X-I2 +
A SERIOUS COMPUTER
IN A DESKTOP PACKAGE
Multiprocessor Technology - Combination of 8, 16 and 32 bit types
1.0 Megabyte Memory* Insures no limitation on programs
-, Wlinchester ,, Disk System • Fast response, large storage capacity
UniFlex* Operating System - The standard of comparison
Hardware Floating Point - Unmatched speed in a small system
Up to Three Terminals - Instant expansion
•TratJ«n>*rk of Technical systems Consultants
SOUTHWEST TECHNICAL PRODUCTS CORPORATION
219 W. RHAPSODY
SAN ANTONIO, TEXAS 78216 (512) 344 0241
Only Microware's OS-9
Operating System Covers
the Entire 68000 Spectrum
ROM BASED
CONTROL
SYSTEMS
FLOPPY-DISK BASED
PERSONAL
COMPUTERS
UISK k.
IN0U
SYS"
HANDHELD
COMPUTERS
SMALL SYSTEMS
HARDWARtSOFTWflt
DEVEtOPMENT STSTCMS
SCALt
URGE SCALE
TIMESHARING
SYSTEMS
■
M1DIUM S
HMISHARmC SYSTEMS
LARGE SYSTEMS
Is complicated software and expensive hardware
keeping you back from Unix? Look into OS 9 the
operating system fn>m Microivare that gives 63000 systems
a Unix-style environment with much less overhead and
complexity
9 i^ versatile inexpensive and delivers outstanding
performance on any ■ ize system The OS-9 executive is
mu*h smaller and tar more ef
lie lent than Unix bei a use it's
written in Fast compact as
sembly language making it
ideal for critic j I real time ap
plicotinns OS-9 can run on
a broad range ot 8 to 32 bit
system* based on the 08OOO
or 6809 family MPUs trom
ROM-baJcd Industrial con
trailers up to large multiuser
systems
OS-9S OUTSTANDING
C COMPILER IS
YOUR BRII>CE TO UNIX
Mtaowaes C aHnnikr tedr
nology is another I >S° advantage The compiler produces
extremely fast, compact, and ROMable code Vou can easily
develop and port system or application software back and
forth to standard Unix systems Cross-compiler versions for
Key OS-9 Features At A Glance
Compact 06ft) ROMable executive written in assembly
language
User "shell" and complete utility set written in C
C-souice code level compatibility with Unix
full Multitasking/multiuser capabilities
Modular design • extremely easy to adapt, modify, or
expand
Unix-type tree structured file system
Rugged "crashproof file structure with record locking
Works well with floppy disk or ROM-based systems
Uses hardware or software memory management
High performance C. Pascal. Basic and Cobol compilers
VAX and PDP-11 make coordinated Unix/OS-9 software
development a pleasure.
SUPPORT FOR MODULAR SOFTWARE
- AN OS-9 EXCLUSIVE
Comprehensive support for modular software puts I
a generation ahead at other operating systems It multiplies
programmer prddiktivtly and memory efficiency. Applica-
tion software can be built
from individually testable
software modules including
standard library* modules.
The modular struiiure lets
you customize and recon*
hgure OS-9 for specific hard-
ware easily and quickly.
A SYSTEM WITH
A PROVEN
TRACK RECORD
Omc an underground
classic OS 9 is now a solid
hit Since 1980 OS 9 has
been ported to over a hun-
dred 6809 and 68000
systems under license to some of the biggest inames in the
business C^S-9 has been imbedded in numerous consumer,
industrial and C *EM products, and is supported by many
independent software suppliers.
OS-9
M1CROWARE SYSTEMS CORPORATION
1866 NW I14th Street
Des Momes, Iowa 50322
Phone 515-224-1929
Telex 910520*2535
Microware lapjiv Ud
3-8 9 Baraki Uhtkjwj City
Chfbd 272-01 Japan
Phone 0473428)4493
Telex }99-3i22
iJS-^ HJ (rairrndrfc vf Wkmwjn' #nd Mi«t*»(nb (Jul* «» J bjitcm.irk ■•»{ Hell \Jt*\
Por tlons of the text for ^fl* Micro Journsl »ere
prepared using the following furnished Hard/Software:
COTTERS - HARMASE
Southwest Techlncel FVoducts
219 W. Rhapsody
San Antonio. TX 78216 _, _ m „ _ , .
S09 - 5/8 (*F Disk - OOST - 8212W - Sprint 5 Printer
GIMIX Inc.
1337 Wast 37th Place
Chicago* IL 60609 rifrv
SuperTfclnfreme - 0S9 - FLEX
Assorted Hardware
EDITORS - WORD PROCESSORS
Technical Systems Consultants, Inc.
Ill frovTdence Road
Chapel Hill. NC 27514
EX- Edit*
FLEX
or - Text FVocessor
Great Plains Computer Co., Inc.
P0 Box 916
Idaho Falls, 10 83401
Stylograph - hill Marge - Spa*l
Editorial Staff
Oon wl I Hams Sr . Publisher
Larry E« W1| Hams
Tom E. Williams
Robert L Nay
Executive Editor
FVoductlon Editor-
Technical Editor
Adalntstratlve Staff
Mary Robertson Office Manager
Penny Williams Subscriptions
Christine Kocher Accounting
Contributing, Editors
on Anderson ffc>rm Gommo
Petar Olbble William E. Fish
Or. Theo Elbert arl Mann
Or. E- M. Pass Ron Volgts
Philip Lucldo
Special Technical fVoJects
Clay Abrams K6AEP
Tom Hunt
CONTENTS
Vol.VII,Lssue VII
FLEX USER Notes 7
0S9 USER Notes 12
C USER Notes 16
68000 USER Notes 20
ADA And The 68000 - Part 3.. 25
Basic 0S-9 28
CoCo USER Notes 35
UNIX Like Tools (DRAGON) 37
Bit Bucket 45
Classified Advertising 52
July 85
Anderson
Dibble
Pass
Lucido
Blbecti
Voigts
Mann
Gilchrist
Taylor
MICRO
JOURNN.
Send All Correspondence To:
Counter Publishing Center
66* Micro Journal
9900 Cessanora Serttb Rd.
Hliisoa, Tn. 57543
Phone (615) 842-4600 or Telex 558 414 PVT 8TH
Copyrighted 1969 by Computer Publishing Inc.
68' Mfcro Journal Is published 12 times a year by
Computer Publishing Inc- Second Class Postage Paid
ISSN 0194-5025 at Hlxson, Tn - and additional entries-
Postmaster: send form 3597 to 68* Micro Journal, P08
849 Hlxson, Tn. 37343.
Subscription fertos
1 Year $24.50 U.S.A., Canada I fexlco Add $9.50 a
Year* Other Foreign Add $12 a Year for Sort ace.
Airmail Add $48 a Year. Must be In U.S. cu
Items, or Articles For Publication
Articles submitted for publication should Include
authors name, address, telephone nunber and date.
Articles should be On either 5 or 8 Inch disk In
STYLOGRAPH or TSC Editor format with 3.5 Inc* Cbtaew
vfdth. All disks «1II be returned- Articles submitted
on paper should be 4.5 Inches In width (Including
Source Listings) for proper reductions. ftmeae Use A
Dark Ribbon!! No Blue In kM Single space on 8X11 bond
or better grade paper. No hand written articles
accepted. Ofsks should be In FLEX2 6800 or FLEX9
6809 any version or 0S-9 any version.
The following TSC Text Processor commands 0M.Y
should be used: .sp space, *pp paragraph, .fl fill and
• nf no fill. Also please do not hrmOf within the text
with multiple spaces. We will enter the rest at time
of editing.
All STYLOGRAPH commands ere acceptable except ,pg
page command* We print edited text files In con t\ nous
text form.
letters To The Editor
All letters to the editor should comply with the above
retirements and nest be signed. Letters of gripes"
as well as "praise" are solicited- We reserve the
right to reject any submission for lack of "good
taste" and we reserve the right to define "good
taste*.
Advertising tote*
Commercial advertisers please contact 68* Micro Journal
advertising department for current rate sheet and
requirements.
Classified
Islng
All classified ads must be n on -commercial. Minimum of
S9. 50 for ffrst 20 words and .45 per word after 20.
All classifieds must be paid In advance. No classified
ads accepted over the phone.
July '85
'68 4 Micro Journal
GIMIX HAS THE 6809 SYSTEM TO SUIT YOUR NEEDS
2
o
HARDWARE
All systems feature the GIMIX CLASSY CHASSIS; with a ferro-resonant constant
voltage power supply, gold plated bus connectors, and plenty of capacity for future
expansion.
Static RAM and double-density DMA floppy disk controllers are used exclusively in all
systems.
All systems are guaranteed for 2 MHz operation and include complete hardware and
software dxumentation, necessary cables, filler plates, etc.
Systems are assembled using fcumed-in and tested boards, and all disk drives are
tested and aligned by GIMIX.
You can add additional components to any system when ordering, or expand it in the
future by adding RAM, 1/0, etc.
GIMIX lets you choose from a wide variety of options to customize your system to your
needs.
SOFTWARE
All 0S-9/FLEX systems allow you to software select either operating system.
Also included is the GMXBUG monitor and. in systems with 128K or more of RAM,
GMX-VDISK for FLEX.
All GIMIX OS-9 systems include MterowarVi Editor, Assembler, Debugger, Baslc09>
and Runb; and the GMX versions of RMS and DO for OS-9.
All GIMIX versions of OS-9 can read and write RS color computer format OS-9 disks,
as well as the Microware/GIMIX standard format.
New and exclusive with OS-9 GMX III systems is the GMX OS-9 Support ROM, a
monitor for OS-9 that includes memoiy diagnostics and allows the system to boot directly
from either hard disk or floppy.
A wide variety of languages and other software is available for use with either OS-9 or
FLEX.
OS-9 GMX HI/FLEX SYSTEMS (#79)
The 179 super system now Includes (tn addition to the above); the 6 MX
6809 CPU III. a 256K CMOS Static HAM Surd (§72). and a 3-porl In*
Mgtfit Serial I/O Pratt* <#11>.
Hie 6MX 6809 CPU III can perform high-speed 0MA transfers from
memory to memory and uses memory attributes and illegal instruction trap*
ping to parted the system and users from piogram crashes. II a user pro-
gram crashes* only mat user is affected; other users are unaware of the
probton.
The 3-Port intelgent Serial I/O Board (§11) significantly reduces system
ovemead by handling loutine 1/0 (unctions: freeing the host CPU for run-
ning user programs. Thte Improves overa* system performance and alows
user temviate to be run at up lo 19 2K baud.
with dual 40 track DSfJO drives. . , , S5998.79
with dual 80 track OSOO drives . SS198.79
with #88 dual 8" OSDO drive system $7898,79
wi(h890 19MB Winchester subsystem and or* 80 track $8898.79
wima47MBWIncrtelBf subsystem and one 80 iradc S10.896.79
with a 47MB plus a 6MB removable pack Winchester
subsystem and one 80 track drive S12.398.79
TD 0*081 8Y MAIL: SEND CHECK OR MONEY OftOER Oft USE YOUR VISA OR
MASTER CHAAGfc Raise allow 3 *mkt tor personal cftecks to dear U.S.ofttarsatt
S5 nanfflng If order b unto $200 00 Foreign oroer* add $10 rtatfung if order is
under $200 00 Foreign orders over X20Q 00 *■ be shipped via Emory Air Freigffl
COLLECT, and we *ri charge no handing Al orders msi be prepaid In U.S. funds.
Ptoass note that foreign cftfrtcs nave been taking *ovt 8 weeks tor coJoaon so we
would advtse wirty novy. or checks drawn on a benfc eccoum to die U S Ovr bank
Is the Conenemai Itknots toon* Bank <* Clopo. 231 S. LaSaBe Street Cntogo. IL
00693. account §73-32031
BASJC49andQS-9anjt7*fanartoofMkro^ and MOTOROLA, If*
REX and \MfWL em Trademarks of Technical StfStfW CertAAaro. inc
GIMIX. GHOST. GMX. CLASSY CHASSIS, are (radwuarks of GIMIX. inc.
OS-9 GMX I / FLEX SYSTEMS #49
The #49 systems Include 64KB static RAM, #05 CPU. #43 2 port serial
boa id.
with dual 40 Hack OSOO dirves 83998.49
wfthdua!80 track OSDDditvts S419S.49
with 888 dual 8" OSOO dirve system J5698 49
with 1901 9MB Winchester subsystem and one 80 track S6898.49
OS-9 GMX II / FLEX SYSTEMS #39
Tne #39 systems incajde 128KB static RAM. #05 CPU. #43 2 pat serial
board.
with dual 40 track OSDO drives $4498 39
with dual SOtrac k DSOOdrtves $4698.39
with #88 dual 8" OSDO drive system 16198.39
with #90 19MB Wind**** subsystem and one 80 track $7398 39
GIMIX DOES NOT 6UARAXTIE PERFORMANCE OF ANY G1MEX SYSTEMS.
BOARDS 08 SOFTWARE WHEN USED WITH OTHER MANUFACTURERS
PROOUCT.
EXPORT MODELS: ADD $30 FOR SOMz. POWER SUPPUES.
GIMIX. Inc. reserves the right to change pricing, terms* and products
specifications at any time without further notice
ALL PRICES ARE F.OB. CHICAGO
Contact GIMIX lot price and availability of UniFLEX and UniFLEX GMXIII
Systems.
NOTE on all drive systems: Dual 40 track drives Dave about 700KB of for-
matted eerily, dual 80s about 1.400KB: dual 8" about 2.000KB, Tne
formatted capacity of hard disks b about 80% of the total capacfty.
Want to expand your system to a
megabyte o! Static RAM and 15 users?
Simply add additional memory and I/O boards. Your GIMIX system can
grow with yotrr needs. Contact us tor a complete list of available boards and
options.
§72 256KB CMOS STATIC RAM board
with battery back up S1898.72
f*4 64KB CMOS STATIC RAM board
with oattoy back up , 1528.84
867 64KB STATIC RAMboard 1478,67
ill 3 port irrtettoenl serial I/O board S498.11
f43 2pojtserfeli/0board — ..,,$126.43
W 2 port paraflei I/O board $88.42
895 cat* sets {ineeded per port), specify board , $24.95
NOW
SHIPPING !
UniFLEX
GMX III Systems
Gimix
1337 WEST 37th PLACE
CHICAGO, ILLINOIS 60609
(312)927-5510 •
TWX 910-221-4055
Ciee* 6*jo. etc
The OFFICIAL BASIC09 TOUR
GUIDE is skillfully written in a friend-
ly and easy-to-read style. Just
perfect for those new to computers
and to BASIC09. It's also a valuable
reference book for programmers,
engineers, students and hobbyists,
providing an in-depth look at
BASIC09 plus an overview of the
OS-9 operating system. Compre-
hensive reference sections on
BASIC09 and OS-9 commands are
also included.
The book "maps" out your route
through the Mercedes of Basics . . .
BASIC09 and puts you in the driv-
er's seat in no time. Fasten your
seatbelt, sit back and enjoy the ride
to perfecting your programming
skills.
MiCROWARE . . .
The OFFICIAL BASIC09 TOUR
GUIDE comes from the people who
wrote BASIC09. As the leader in
6809 system software, we at
MICROWARE care about our users
and want to help you get the most
from our products.
It's Easy to Order.
Phone orders are accepted from
MasterCard or VISA cardholders or
for COD shipment. You can also
order by mail using the coupon
below. Quantity discounts are
available to educational organiza-
tions and dealers. For further infor-
mation contact Microware.
Spaiuhsts in $y*ttm software for OS- family mkropmeswr* since 1977*
OS 9 and BASIC09 are trademarks ol Microware and Motorola
Microware Systems Corporation
1866 NW 114th Street
Oes Moines, Iowa 50322
Telephone 515/224-1929
Tefex 910*520-2535
Please send .
copies ol the
8aalc09 Tour Guide book at S18 95
eacri, Add $2.00 for UPS shipping in
the U.S or $6 00 for overseas air mail
per book. Iowa residents add 4%
sales tax
Name
Address
City
State
_2ip_
C3 I have enclosed a check
D Charge lo my bank card:
MasterCard D VISA
Card Number __
Expiration
July 85
W Micro Journal
..HtAR Y£. HtAR
OS-9
User Notes
By: Peter Dibble
As Published in 68 Micro Journal
The publishers of 68 Micro Journal are proud to announce the
publication of Peter Dibbles 0S9 USER BOTES .
Information for the BEGINNER to the FRO,
Regular or CoCo 0S9
Qalng 0S9
HELP, HINTS, PROBLEMS, REVIEWS, SUGGESTIONS, COMPLAINTS, 0S9 STANDARDS,
Generating a New Bootsrap, Building a new System Disk, 0S9 Users Group, etc.
Progru Interfacing to 0S9
DEVICE DESCRIPTORS, DIRECTORIES, "FORKS", PROTECTION, "SUSPEND STATE", "PIPES",
"INPUT/OUTPUT SYSTEM", etc.
ProgrAMdng language*
Assembly Language Programs and Interfacing; Basic09, C, Pascal, and Cobol
reviews, programs, and uses; etc.
Disk* Include
H« typing all the Source Listing* In. Source Code and, where applicable,
assembled or compiled Operating Prograaa. The Source and the Discussions in
the Columns can be used "as Is", or as a "Starting Point" for developing joar
Otfl more powerful Programs. Programs sometimes use multiple Languages such
as a short Assembly Language Routine for reading a Directory, which is then
"piped" to a Basic09 Routine for output formatting, etc.
!!! Coming Soon !!!
Catch Us Next Month
for More Details
Continually Updated In 68 Micro Journal Monthly
Computer Publishing Inc.
B5900 Cassandra Smith Rd.
Hixson, TN. 37343
-J
» TO
* 0S9 Is • trftdeurk. of NJcrovftr* Syic«u Corp. ««d HotoroU Ioc.
» bW Hlcro Jonrttftl li ft tr^dcaarh. of Computer Publilhing Ioc.
34 M3H
(615) 842-460P
Telex 558 414 PV1
34
'68' Micro Journal
July '85
FLEX™ USER NOTES
THE 6800-6809 BOOK
By: Ronald W. Anderson
As published in 68 MICRO JOURNAL"
The publishers of 68 MICRO JOURNAL are proud to announce the publication of Ron Anderson's FLEX USER NOTES, in
book form. This popular monthly column has been a regular feature in 68 MICRO JOUR N AL S I NCE 1 979. It has earned (he
respect of thousands of 68 MICRO JOURNAL readers over the years. In fact, Rons column has been described as the
Bible' for 68XX users, by some of the worlds leading microprocessor professionals. Now all his columns are being
published, in whole, as the most needed and popular 68XX book available. Over the years Rons column has been one of
the most popular in 68 MICRO JOURNAL And of course 68 MICRO JOURNAL is the most popular 68XX magazine
published.
As a SPECIAL BONUS all the source listing in the book will be available on disk for the low price of: FLEX '* format only — 5"
$12,95 — 8" $16.95 plus $2.50 shipping and handling, if ordered with the book. If ordered separately the price of the disks
will be: 5" $17.95 — 8" $19.95 plus $2.50 shipping and handling.
Listed below are a few of the TEXT files included in the book and on diskette.
All TEXT files in the book are on the disks.
LOGO.C1
MEMOVE.C1
DUMP.C1
SUBTESTS
TERMEM.C2
M.C2
PRINTC3
MODEM.C2
SCIPKG.C1
U.C4
PRINT.C4
SET.C5
SETBAS1C5
File load program to offset memory — ASM PIC
Memory move program — ASM PIC
Printer dump program — uses LOGO — ASM PIC
Simulation of 6800 code to 6809, show differences — ASM
Modem input to disk (or other port input to disk) — ASM
Output a file to modem (or another port) — ASM
Parallel (enhanced) printer driver — ASM
TTL output to CRT and modem (or other port) — ASM
Scientific math routines — PASCAL
Mini-monitor, disk resident, many useful functions — ASM
Parallel printer driver, without PFLAG — ASM
Set printer modes — ASM
Set printer modes — A-BASIC
(And many more)
"Over 30 TEXT files included in ASM (assembler) — PASCAL— PIC (position independent code) TSC BASIC-C. etc
NOTE: .C1..C2, etc. * Chapter 1. Chapter 2> etc.
This will be a limited run and we cannot guarantee that supplies will last long. Order npw for early delivery
Foreign Orders Add $4.50 S/H
Softcover — Large Format
Book only: $7.95 + $2.50 S/Kf
With disk: 5" $20.90 + $2.50 &'i
With disk: 8" $22.90 + $2.50 S/H
See your local S50 dealer/bookstore or order direct from
Computer Publishing Inc.
5900 Cassandra Smith Rd.
Hixson, TN 37343
TELEX 55* 414 PVT BTH (615) 842-4601
"FLEX is a trademark ol Technical Systems Consultants
July 85
'68' Micro Journal
FLEX
User Notes
Ronald y, Anderson
5^0 Sturbridqe Court
Ann Arbor, Hi H&lQb
Twenty Years
I guess twenty-two would be more
accurate* I was looking at the "Life
Science Library" the other day (copyright
1963), and I decided to see what they had
to say about computers. There is a photo
titled "Magic Crystals and a Trend to
Miniatures". The statement is made "Other
crystals being developed are so diminutive
that one of them, no larger than this
capital "0", does the job of four
transistors and two resistors," Of course
the capital "0" in question is big enough
in terms of present day technology to hold
about a quarter of a 2732A ROM chip, which
means that it would hold about 8000 memory
locations and therefore at the very least
twice that many transistors and associated
other components. We've come a long way!
What is FLEX
Eased on input from Don Williams, I am
going to start devoting some space here to
some information for newcomers to FLEX* I
thought it might be a good idea to start
at the beginning, though I will probably
move rapidly. What is a Disk Operating
System (DOS) anyway? As you all most likely
know, a microprocessor can do absolutely
nothing unless It is running a program. If
you have a Color Computer, you probably
know that it runs BASIC when it is powered
up. The BASIC for the Color Computer
includes a disk operating system. If you
have an SS-50 bus computer, you probably
realize that It comes up running a
"monitor" program in ROM. In both cases,
the computer starts up in the "command"
mode. That is, it is waiting for
instructions from the user. The monitor
(in the case of the SS-50) contains a few
rudimentary functions that allow you to
look at the contents of memory or run a
quick memory test, but in general it can't
do very much other than wait for a command
from you (of course it has to communicate
with the terminal to do that).
Now, when you type U or D on that SS-50
(or most of the single board computers),
you are telling the system to "boot" the
DOS from the system disk in one of your
disk drives. The monitor contains a very
short program that tells the disk
controller to read sector on track
into some fixed location in memory, and
then to jump to the first location of the
code that it read in* The boot program on
the disk is larger, and it then instructs
the disk controller to read in all of FLEX
and jump to its COLDStart address. In
other words, monitor has a little boot
program (boot is an abbreviation for
bootstrap, as in "lifting yourself up by
your own bootstraps"), it loads a
considerably bigger boot program from the
disk, and that loads the DOS and starts
running it*
Why do you need a DOS? You might guess
by the name "Disk Operating System" that it
has something to do with the floppy or hard
disk drives in the system. Having a disk
drive would do you no good without means to
read programs and disk files from the disk
and write files to the disk. The DOS also
provides facilities to prepare a disk to
accept program and data files from the
computer. It allows you to copy the
contents of a disk to another disk. It
structures the disk so that it has a
"directory" so that you can keep track of
the files on the disk. One of the early
6800 operating systems did not have that
luxury. The user had to tell the system to
read the file at track 07 and sector 04.
He had to keep track of what was on the
disk with a pencil and paper. Perhaps in
the days of single sided single density 5"
disks, that was almost practical. After
all there were only 340 sectors on the
disk, about 85K of storage. Now with
double sided double density 40 track disks
68' Micro Journal
July '85
with 1400+ sectors, or the 80 track
versions with 2800 sectors, that directory
method would not be practical at all,
FLEX includes a Large number of "utility
commands 11 that reside on the system disk
and are supplied with it* The distinction
is made between "memory resident" commands
and "transient" commands* There are only
two memory resident commands in FLEX,
they are called GET, and MON. The first
will load a "binary 1 * file to memory and the
second exits FLEX and returns to the
system monitor program* All other
utilities (at least as FLEX is supplied) are
"loaded" from the disk and then "executed"
(fancy word for "run"). Flex has provision
for re-routing of input and output, so that
information may be input from the terminal
or a disk file, and output may be to the
terminal, a printer, or a disk file. You
may extend that selection of input/output
devices by means of software, to include
such accessories as a modem, multiple
printers, etc.
What are the advantages of FLEX over some
other disk operating systems? That is hard
to answer. What might be a definite
advantage to me might be a disadvantage to
someone else. Basically, though, here is
why I like FLEX* It is SIMPLE and SMALL,
It doesn't create complexities or
roadblocks to my accessing input and
output devices directly with programs that
I write. It is relatively "transparent 1 '. I
can easily write a program that will run on
my computer that is 100% independent of
FLEX, and then dump that program into a
ROM and run it in "stand alone" hardware,
in other words, a special purpose
computer.
The disadvantages, depending on your
viewpoint might be Just what I think are
the advantages. Some of the larger and
more advanced operating systems (OS-9 and
UNIPLEX) are much larger and more capable.
FLEX has Just one directory. The others
allow you to have tree structured
directories. In other words, you can have
sub-directories and sub-sub-directories
several levels deep. That is a great
convenience when you have a hard disk that
can hold literally a couple thousand files.
The more advanced operating systems usually
have features called multi-tasking and
multi-user. Multi-tasking means that you
can have the system compiling or assembling
a program as a "background" task while you
are editing a file. You can print a
program listing or a letter (or a book)
while you are using the computer to do
something else. Of course the computer
has only one processor, and it can do only
one thing at a time, but the system
"slices" time up into chunks and allots a
slice to each of the tasks that are
running. Multi-user means that the tasks
include those necessary to support more
than one user on the system.
FLEX supports a very simple multi-task.
It has a feature called "print spooling".
You can write output that you want
eventually to go to your printer to a
temporary disk file, and then print it from
that file while you are doing something
else . Generally the operation of print
spooling is unsatisfactory at least to me.
If I try to edit a file while print spooling
is occurring, I find that the computer
misses my input characters frequently
because it is off doing something else
while I am typing. I therefore don't use
print spooling. I've heard from others who
don't type as fast as I, who have no
trouble using that feature, however.
Perhaps that is enough of an
introduction for one time. Tli continue
next time with some detail about what is in
FLEX and how to use it effectively.
Feedback
Last month's column contained a plea for
some reader feedback. The FLEX
information above is given in response to
words from Don Williams, as I said above. I
have in front of me another letter that is
quite in the opposite direction. I won't
quote the whole thing, but essentially it
says , , .
OK so now I have one of these SS-50 bus
systems with 56K of memory, FLEX, and "a
ton of software for it", a CRT, a Printer,
A modem, and several special cards hooked
up to the 30 pin buss. Now what do I do?
The letter says that the writer would
like to go on to add a hard disk and a lot
more RAM. He would most of all like some
"multi-programming" capability. He goes on
to say that FLEX is great for a single user
system, but it would seem to stand in the
way of larger memory and multi-user and
multi-tasking operation.
My personal advice won't satisfy this
reader, since I would say why do you need
July 85
68' Micro Journal
mulct tasking on a personal computer? 1
would tell someone with a nice system such
as the one described In the letter to go
on and use the heck out of it. Are you an
accomplished programmer in assembler,
iscaiT Fortran, PL/? and "C"? If not,
there are lots of things you can do with
the system at this point.
Of course FLEX stands in the way of
multi-user and multi-tasking operation.
The beauty of FLEX is, as I have said
before, that it is SIMPLE. My simplistic
answer to multl tasking is to put another
computer alongside of my primary one. I
have a PT69 system with a pair of DSDD 40
track drives and my old ADM-3A sitting next
to my "big system" that has a pair of 8"
DSDD Qume drives on it. If I have need to
compile a program and write a letter at
the same time, I just start one of them
compiling and go use the other for editing.
I have a serial link between them and with
TX and RX utilities published a couple
months ago, I can easily transfer a letter
or a program back and forth between
systems freely.
None of my "raving" in the last
paragraph Is really an answer to the basic
question brought up in the letter. There
are several large capacity memory boards on
the market. The one with which I am
familiar is the one from Computer
Excellence. I have their 256K version
Installed In one system at work and it Is
great as a virtual disk drive. They
publish information in their manual for
using the memory in a multl tasking mode as
well.
This magazine had ads for some time for
a product called Dynashare which would
allow multi-users on a system with extended
memory running FLEX. I don't know what
happened to that product (Don insert a
note if you can shed any light on this).
***(see footnote-DMW)
Certainly there are people out there
capable of writing a few articles on the
realities and practicalities of UNIFLEX.
***-(answer here: Simple, never could get
anyone to do a UniFLEX column) You have a
column right here on OS-9 ***-(answer here:
Mlcroware gave effort and support towards
the OS-9 column, the difference). As the
writer of the letter pointed out, of
course, this means that you start over on
software, something I at least, am not
willing to do. ***-KBASIC allows software
porting FLEX to OS-9 - DMW!
What I see happening with the 6809 is
that there will be little or no more
software written for our systems. That
doesn't bother roe, I still have plenty that
I can use to do what X want to do with my
system. However t this should certainly be
a consideration when it comes to investing
more in one of these systems. What am I
going to do with my systems? The PT69 with
the drives, the terminal and the Epson
printer will go away to College with my
daughter next Fall. If someone actually
does come up with a hard disk (simple plug
In the controller and run It version) and
some drivers that can be added or appended
to FLEX for it, I'll put one on my "large
system". Where that PT69 now sits, I
wouldn't be too surprised to find a Mac or
an IBM clone (or one of each) one of these
days.
I've written my own text processor,
designed to be just what I need and no
more or less. I'm working on my own screen
editor (reason enough to keep this system
busy for a couple of years more), and I use
this system to develop 6809 software for
stand-alone systems as I've said before.
I don't mean to favor one supplier over
the others, but have you seen the latest
Peripheral Technology offering? A complete
system with a hard disk for $20001 What a
nice development system, word processor, or
what have you.
Now, with some of you wanting me to go
back to the beginning and describe FLEX,
and some of you saying you are tired of
your system and where do you go from here,
WHERE DO I GO FROM HERE????
Actually It is more complex than I've
indicated so far. Out there somewhere is
a group who call themselves something like
the "Society for the Promotion and
Encouragement of Miniflex Users in America"
(with apologies to the S.P.E.B.S.Q.S.A.).*
I received a letter recently from someone
who complained that all the software I talk
about Is for the 6809, and he is still
running FLEX2. He went on (mistakenly) to
say that most of the programs submitted to
'68' are 6800 code. Actually, the major
contributors of utilities, Leo Taylor, Bruno
Puglia and a few others, are kind enough to
write their utilities in 6800 code
'68' Micro Journal
July '85
structured so that by changing a constant
or two, they may be assembled as FLEX2
utilities or as FLEX9 utilities. That
practice doesn't indicate that there are
more 6800 users than 6809 users reading
'68' Micro Journal.
Next in the spectrum are the 6809
beginners, possibly recently increased in
numbers by the demise ***(see footnote #2-
DMW) of the Color Micro Journal and the
switch of subscriptions to this journal. 1
think I come in the next category, that of
advanced 6809 user. 1 am, however rather
content with the state of advancement of my
system(s). Last are those who now have a
"full 11 6809 system running, and have tried
all the available software, and are "bored"
and want to move on to something bigger.
1 cautiously say that SOME of the last
category are collectors of equipment and/or
software who, now that there is little new
software appearing for the 6809 systems,
want to move on to bigger and better
things to collect.
Obviously 1 can't please the entire
spectrum, at least not every month. Please
consider my request last month for input,
and the continuation of that appeal this
month as a survey. Tell me what YOU want,
and I'll try to proportion the discussions
so that the most wanted items get covered
most, and the lesser asked for topics don't
get left out altogether.
As of this writing, the April '68' has
been out for a week or two, and two
readers have responded to my discussion of
sorting. Believe it or not, it was pure
chance that led Ron Voigts in his "BASIC
OS-9" column and I to discuss sorting in
the same issue. There must be several
versions of each type of sort, as Ron's
descriptions of the plain bubble sort, the
insertion sort, and the Quicksort
algorithms vary somewhat with my previous
understanding of them. Of course there
are many variations of each type of sort.
One variation of the insertion sort that I
have seen takes the items in their original
order and inserts them in an array in
order. That is, first item goes in at the
top. Second item goes either above or
below the first, depending on whether it is
bigger or smaller. Third item goes top,
bottom, or between the first two. Of
course that means a lot of "moving down" of
the items below the one being inserted.
There is a nice trick variation of this
kind of insertion sort. You can use a
binary search for the place to insert the
new item in the so-far sorted list.
Suppose you have already sorted 1000 items
and you haTC Item 1001 to tne«rt* Test at
item 500. If the new item is smaller titan
item 500 test at 250. If it is larger,
test at 750, etc. each time halving the
interval in which the final insertion will
be made. With 1000 items, you can find the
insertion point in ten compares. Much
better than running down the whole list
one item at a time until you find the
place. You can, if you stop to think about
it, perform this sort in one array. Top
item becomes the first and only item in the
sorted list. Next item moves from unsorted
list to sorted by remaining where it is or
being moved above the first item, etc. The
number of items doesn't change, just the
boundary between the sorted list and the
unsorted one. It turns out that the
insertion sort with binary search is fairly
complex to implement. It runs about 3 or
3.5 times faster than the bubble sort I
published in April. The sort I called "Half
Shell' 1 runs about 5 to 7 times faster than
the insertion sort with binary search, and
it is easier to implement.
I am going to hold off further sort
program listings until I see if there are
more than two responses to that question.
Disk Compatibility
I've been receiving a large amount of
feedback from readers and software
suppliers regarding the FLEX disk
compatibility problems. There is not
enough space left in this column for all of
it, and the most complete analysis of the
problem arrived today. I'll include an
update in the next column. Meanwhile, I
ought at least to say that the patch
reported a few columns ago, (from Kent
Meyers) will only work with a 1771, 1773
type controller. The newer ones, including
the 279 7 used in the Peripheral Technology
system, can't be made to ignore the side
byte, and can't be patched by hardware.
Meanwhile the old "standard" 340 sector
SSSD 35 track for 5" disks, and the SSSD 15
sector per track, 77 track format for 8"
disks are compatible with everyone's FLEX
and hardware.
Perhaps the best way would be for
someone to write a set of format utilities
that are compatible with all "the
10
July 85
66* Micro Journal
controllers, and then to publish the
hardware patch to the SWTPc controller
boards to make the side select the side
select and the density tbe density per the
IBM Standard. Then we could all throw away
-*fc*r- fTWTFc type of Newdisk utility, and be
compatible all the way. 1 understand that
Peripheral Technology is changing their
board so that it may be jumper (or switch)
programmed to be compatible with either
format, (That is only rumor, don't hold me
to it). Apparently while I've been
wondering about the compatibility problem,
a lot of folks have known exactly what the
problem is. I'm glad I brought the subject
up. By the time the next column is in
preparation, I ought to be able to get
permission to quote one or two of the
responses I've received.
***~Footnote #1: It appears that we were
the only ones selling or pushing Dynashare,
some time back. It had some 'nasty bugs
that showed up when a hard disk or other
device, in the same address range was
Installed on the systems. Also it hard-set
the end of memory pointer to $BFFF, which
caused a lot of headaches if you had
printer drivers, etc. , residing below in
memory.
The folks who actually did Dynashare
for Computer Systems Center of
Chesterfield. Mo., were traveling, or
something (per a few calls from the
author), and fixes were slow and beyond
what I felt was sufficient for a commercial
product. So, I dropped it from the
catalog. However, since then I have
received a new version from Joe Turner,
which is supposed to have the bugs fixed.
I Just have not had time to sit down and
debug the product a second time. S.E.
Media now has the 'new, improved' (fixed)
version in stock, but I will not advertise
it until I know it is running properly!
Actually it is a shame, for I felt that
Dynashare should have been a '-mark' piece
of software, it had all the promise of
making FLEX even better. While it was
working, it did, when it died, so did a lot
of files that were open! I am willing to
send a 'beta cop/" of the latest version to
someone willing to give it a real
thrashing. That means you must have an
SWTPC with at least 128K (SO-9 SWTPC system
or better) and a SWTPC hard-disk. I insist
on the hard-disk as most anyone serious
enough to want multi-user multi-tasking
operation, must have need for the hard-
disk. Let me know if you are Interested
and what qualifications you have for
'proving' a software project.
So Ron, to answer your question above;
I am keeping quiet and not allowing S.E.
Media to advertise it (despite having
bought and stocking it) until I AN
SATISFIED IT IS WORKING PROPERLY - AND AS
ADVERTISED! Betcha heard that before.
***-Footnote #2: I take a little exception
to the word 'demise'. COLOR Micro Journal
did not 'demise'. I stopped it because it
was going nowhere.
Fact is, it was in the black and a
profit maker (not much but plus) when I put
it in the 'HALT Mode', and that is where it
is now. We think we were the 2d largest
color computer magazine out there, when all
the figures were compiled. And growing
each month. But, I could not see it going
anywhere, and I needed the people and
facilities it was using, to do other
things. You see, I have very little faith
in Tandy to continue the color computer, as
we now know it. I am afraid the next
generation CoCo will be too high priced for
the average CoCo user, as we know him/her
now days. But, if not and it goes well,
COLOR Micro Journal will be back.
We still have the loyal readers, who
were interested in the serious aspects of
the thing (not games or toy users). I can
have it back rolling on 45 days notice!
But, I am going to have to have not only
the readers, but also advertisers, which we
were short on before. It was Just that we
catered to a market that could not
advertise. And many of those that were, or
did, went belly-up, and guess who sometimes
ended up holding the empty bag? The very
8 ad part of it 18 that many of those that
did not sake it, had the better products! It
They had the stuff that made the CoCo a
"real computer'. But I guess that is the
problem, no one, including Tandy, wants the
CoCo to be a 'real computer', that is not
in it's present form. Hence, we and a very
few others were out there, all alone.
Sorta like 'Maytag' repairmen - a lonesome
situation. BUT, I SAT AGAIN, WE CAN
RETURN!
Also See Editor's Comment on page 45
DMW
68* Micro Journal
July 65
11
OS-9 User Notes
Peter Dibble
M7 Coler Mouse
Rochester, N.Y. 14620
It's Only Virtual
Virtual memory has begun to be an
issue in our little corner of the world.
TSC has a version of Unlflex for the
68010/20 that supports virtual memory.
Hlcroware is working on a similar version
of 0S-9/68K. I like virtual memory. It
is a wonderful labor-saving device. There
is, however, a dark side,,.
Virtual memory is a new concept for
microcomputers. Let me start with a
review of the "virtual" business.
A virtual resource is something that
appears to a program to exist, but is
actually an imitation constructed by the
operating system and (perhaps) some
hardware tricks. In the case of virtual
memory, a program can read and write
memory that doesn't actually exist.
Virtual memory requires two special
features to be implemented in hardware.
The simpler one is something like the DAT
found on level two systems except that it
works in reverse. Say we are using a
processor with a 24-bit address buss on a
system with one megabyte of real memory.
A megabyte of storage is only a 20-bit
address range. The DAT must translate
each 24-bit address produced by the
processor into a corresponding 20-bit
address or generate an error, a "page
fault."
The other special hardware required
for virtual memory is a special way of
handing page fault interrupts. A page
fault might occur when an instruction was
being fetched, or it might happen while
operands were being read. Sometimes an
instruction might be well under way before
a page fault takes place. The problem is
that the instruction might already have
had some effect. An instruction that
modifies a string many bytes long might
hit a page fault after operating on most
of the string. You can't always just
restart the instruction from the beginning
when you are ready. The usual way of
solving the problem is for the processor
to save its low-level state as well as the
usual registers when it gets a page fault.
A special return-f rom-interrupt
instruction restores the state and
restarts the instruction where it left
off.
Systems, like the 68010/20, that use
virtual memory efficiently include other
hardware tricks, but the DAT and the
special interrupt are the fundamental
ones.
A page fault causes the processor to
save its low-level state and passes
control to the operating system.
Depending on the type of page fault, the
operating system may abort the program, or
it might do the virtual memory "thing."
Doing a convincing job of imitating
memory without at least enough storage to
record the contents of the memory you're
trying to imitate would be impossible. If
you use real memory to store the contents
of the memory you're imitating, you might
just as well not bother doing the
imitation. If you store the contents of
the imitation memory on something less
expensive than real memory, say disk, then
you're getting somewhere. That's just
what virtual memory systems do.
The memory on a system that uses
virtual memory is a large file on disk.
When a chunk of that memory (called a
page) is referenced by a program, it is
read into real memory and the processor is
told that the range of virtual addresses
in that page are to be found in the real
addresses used to store the page. Since
there is more virtual storage than real
storage, every time a page is read in it
bumps a page out. If the page has been
modified it needs to be written back to
disk. If it is unchanged, the copy
already on disk is identical to it and the
page need not be rewritten.
12
July '85
68' Micro Journal
The most expensive possible memory
reference in a virtual-memory system
includes these steps:
* The processor detects a reference to a
location that isn't available in real
memory.
* The processor interrupts the instruction
and jumps to a part of the operating system
responsible for memory faults.
* The operating system determines that the
memory the instruction wants is on disk.
* The operating system guesses which page
in memory is least likely to be used soon
and writes that page (if it was modified
since it was last read from disk) to disk,
* The operating system reads the page
required by the program from disk into the
location it just cleared,
* The operating system updates the
processor's table of what pages are where
in real memory (DAT image),
* The instruction interrupted in the first
step is resumed where it left off.
You can see that one inconvenient memory
reference can involve a disk write , a disk
read, and a bunch of processing.
If every memory access involved a
page fault, virtual memory would slow a
processor down so much nobody would use
It. On a microcomputer a memory access
takes something like a millionth of a
second. A page fault takes about a tenth
of a second to service. Slowing down
processing by a factor of L00>000 isn't
something to be done lightly.
A characteristic of most programs,
called locality, makes it possible for
most programs to run almost as fast with
virtual memory as with real memory.
Locality is the tendency of program
execution to move relatively slowly
through memory. The instructions for a
subroutine are usually located in a block
and the data for that subroutine is
usually located in another block. Another
way of looking at this is that over some
short time most programs use about 203 of
the memory allocated to them much more
heavily than the rest.
At any moment a program has something
called a working s»t which is the group of
pages that the program is referencing
frequently at that time. If the system
has enough real memory to hold * program's
working set and the pages in the working
set change slowly, the system will need to
move pages to and from the disk relatively
seldom.
So, if a system has enough real
memory to hold the working sets of the
programs you want to run plus soma memory
for the operating system, it can use
virtual memory without the factor of
100,000 speed penalty. In a system that
is well designed for virtual memory the
speed may be within a few percent of where
it would be if the memory were all real.
Trouble sets in very rapidly when the
amount of real memory available sinks
below the working set size. Just where
the critical point falls depends on the
program and the algorithm the operating
system uses for deciding what pages to
page out, but with little enough real
memory your system will start to "thrash"
and you might just as well turn it off.
The thing that set me off on this was
a note in the Bit Bucket of the Hay issue
that said that Franz Lisp would be
available for UniFlex soon. Lisp programs
have especially large working sets. A
computer with about three megabytes of
real memory can run Franz Lisp
comfortably. An S50 system with a limit
of a megabyte of real memory running Franz
would be funny in a sad kind of way.
There are plenty of computers running
UniFlex (and OS-9) that don't use the S50
bus, but, if you have your money in a box
like mine, don't start dreaming about
Franz Lisp running in virtual memory too
soon.
A little story might put this in
better perspective. We have a Symbolics
Lisp machine at school. Symbolics
designed their machines to run lisp. They
have a special instruction set which
practically constitutes a lisp interpreter
in microcode. At lunch today another
student was telling me about the warning
message he got from it after a few hour's
work: ***** Warning — Only 2 Megabytes
Left.
I Just got a letter from Glmix
telling me that they have a 68020 system
with VIRTUAL MEMORY. They didn't mention
a price, and even if it is low, graduate
students aren't funded at a level that
permits that kind of luxury. Let's
imagine that my books are million sellers.
'68' Mfcro Journal
July '85
13
• Latest Hardware
• Newest Software
• Technical Sessions
for 6809 & 68000
Meet people making it happen in OS-Si The moms and shakers
who are helping 0S*9 become the fastest growing operating
$><stem for the 6809 & 68000 tn the world
Uvel/ and informative round-table discussions will cover the
design and use of Microware Software, Well also discuss 0S9's
dynamic growth from where we are today to where we may be
in the future
The exhibit area will feature booths from many of the leading
supplier of OS 9 compatible hardmw and software It's a great
opportunity to increase your skill and knowledge in the latest
microcomputer software technology. Plan to attend — Register
Today!
Seminar only S150 Hotel Package" S350
Location Marriott Hotel, Des Moines, IA
Don't Miss It — Pre-Register Now!
Call 515-224-1929 or Write
MICROWARE SYSTEMS CORPORATION
1866 N.W. 114th St. • Des Moines, IA 50322
— Tfuctoqmo-
Let's also assume that Microware creates
a version of OS-9/68K for the system.
What will I do?
I'll go for a virtual memory system
like a shot. I'd prefer one with room for
a few megabytes of memory, but if that is
out of the question I'll live with what I
can get. If someone offers me a copy of
Franz Lisp VERY cheap I might buy it, but
that isn't the only reason to have a
system with virtual memory.
It would be nice to be able to edit
very large files without having to use
,r raore. ,r With virtual memory > large files
could be loaded into memory. I usually
move through a file pretty slowly as I
edit. Global search and replace
operations would page hard, but that's the
price you pay.
Programs could include fancy error
handling code and lots of friendly
options. Good error handling can take up
several times as much space as the initial
program. Programs that use several
megabytes come to mind that would only
need a few hundred kilobytes If all error
handling were removed.
I want a computer with plenty of
memory, but S50 machines are limited to a
megabyte. Virtual memory gives me a way
out and I won't turn It down, but if I
every forget that the memory is only
virtual it will remind me. My disk drive
will turn on its light and go
shuf f a-shuf f a* . . while I catch up on ray
reading.
Keeping a Journal
It seeras the IRS requires people who
want to take their computer as a deduction
to keep a log of their use. I've never
been much good at that kind of thing so I
built It into ray computer.
At first I thought about creating a
special program to keep the log, but it
bothers rae to do something like that just
for some busybody in Washington (at least
without pay) . I created a quick and dirty
solution, I have ray password file execute
a shell script before I start up. The
password file entry looks something like
this;
'Hotei package mcfudes 3 nights, stngle ocevponcy at the Matrtoti Hotel
and registration toe
OS 9 and 3ASIC09 are trademarks ot Microware and Motorola
Peter, X, 0,128,
ex shell
14
July 85
, shell /HO/USAGCLOG/crad;
68' Mico Journal
The part of the line starting with "shell"
is the important part. It starts a shell
which starts another shell with the file
/HO/ US AGE. LOG/ cmd as input. When that
shell script is done "ex shell" starts a
fresh shell which will be left running for
me.
The shell script goes like this:
echo Type a log entry then
esc on a new line. >/term
chd /hO/usage.log
build temp </term
date t >temp2
merge log temp 2 temp > temp 3
del temp temp 2 log
rename temp 3 log
Standard input needs to be redirected
because the shell (and therefore all
programs it runs) is getting its input
from the command file. First 1 prompt
"Type a log entry then esc on a new line,"
Then I collect the response in a file
called temp, 1 get the date and time from
the system and save them in a file called
temp2. Finally I add them to the end of
the log file with the command sequence:
merge, del, rename,
I was pretty happy with the shell
script approach except for one think. The
merge, del t rename method of appending a
few lines to the end of a file was ugly
and slow. OS-9 needs a way to append one
file to the end of another.
Since I was still objecting to
writing free programs for the IRS I wrote
Append (which would have been easy to do
in assembler) in C. With append, cmd
looks like:
echo Type a log entry then
esc on a new line, >/term
chd /hO/usage.log
append log </term
date t ! append log
This shell script looks better than the
old one and It runs a great deal faster.
As the year goes on and my log file gets
bigger, I'll remember how glad I am that I
don't have to copy it with merge each time
I log on Just to put a couple of new lines
at the end of it.
11 April 1985 22:46 Append. c
Page 1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
lb
n
18
19
20
21
22
23
24
#include <stdlo.h>
maln(ct t val)
int ct;
char **val;
{
char *FileName;
FILE *0utFile;
char c;
if(ct > 1) {
FileName = valll] ;
if((OutFile - fopen( FileName, "a")) — NULL) {
fprintf (stderr,
"Zs: Is can't be opened for writing\n",
val[0j, FileName);
exit(l);
)
} else
OutFile » stdout;
while((c - getchar()) !- EOF) putc(c, OutFile);
fclose(OutFile);
exit(o);
'68* Mfcro Journal
July 85
15
"C" User Notes
Idgar H. (6ud) Pass, Ph.D.
U^A latta Lane
Conyera, Ca 30207
INTRODUCTION
As already described, the C language has no
I/O or operating system calls in its
syntax. Rather- all such abilities are
provided thru functions. This chapter
discusses the standard C library functions,
which provide many of the facilities
available in other languages, and provide
much of the power of the C language.
The "prlntf" function, which has been used
several times in previous chapters with
little explanation, is a member of the
standard C library, and is discussed
further in this chapter,
STANDARD C LIBRARY
The standard C library functions described
below are representative of those available
in a full C implementation. The C
programmer must determine the structure and
use of the C library for a specific
implementation.
Most versions of C compilers require the
programmer to include a reference to the C
library with a preprocessor comnand similar
to the following:
#include "stdio.h"
and
#include "ctype.h"
and
include "flex.h"
and
include "os9. h H
In fact, there may be multiple C libraries
in many implementations, in which case
multiple 'f include" commands may be
required in order to specify the required
libraries, the exact nature of which is
highly implementation-dependent.
Some implementations of C compilers require
different delimiters surrounding the name
of the file to be included. Dyna-C
requires no surrounding delimiters at all.
The McCosh family of C compilers uses
double quote symbols to indicate that the
current working or data directory i$ to be
searched. It uses V and ">* to indicate
that the current system or "dO/defs"
directory is to be searched.
In order to help the reader become oriented
to reading C functions, versions of some of
the simpler C library functions are
provided below. Note that these are only
representative and do not necessarily
indicate how the function would be provided
in a given implementation.
INPUT AND OUTPUT FUNCTIONS
Fclose closes a file which has been opened
by fopen.
int fclose(fp)
FILE *fp;
Fgets reads a line of up to n characters,
into the area pointed to by *s, from file
with file pointer fp.
char *fgets(s,n,fp)
char *s;
int n;
FILE *fp;
Fopen opens a disk file for access by the C
program; the name parameter should point to
a null-terminated string that is the name
of the file to open- the mode parameter is
also a null -terminated string, and contains
the access mode desired.
FILE *fopen( name, mode)
char *ndme,*mode;
Fprintf is similar to printf except that
the formatted line is written to the file
via file pointer fp.
int fyrintf (fp,fmt,argl,arg2,. . . )
FILE *fp:
char *fmt;
Fputs writes a null-terminated string to
tne file with file pointer fp.
char *fputs(s,fp)
char *s;
FILE *fp;
Fread reads binary data from the file with
file pointer fp, into an area pointed to by
ptr, for a length of size times number
bytes,
fread ( p tr , s i ze , number f f p )
char *ptr;
int size, number;
FILE *fp;
Fscanf is similar to scanf except that the
file with file pointer fp is used for
input.
int fscanf (fp,fmt,argl,arg2,. . .)
FILE *fp:
char *fmt;
Fwrite writes binary data to the file with
file pointer fp, from an area pointed to by
ptr, Tor a length of sue times number
bytes.
fwri te( ptr, size, number, fp)
char *ptr;
int size, number;
FILE *fp;
Getc returns the next sequential character
from the file with file pointer fp.
int getc( fp)
FILE *fp;
Getchar is the same as getclSTUIN).
int g*tchar()
16
July '85
68* MiCfQ Journal
Gets attempts to read a line or input rrom
STDIN.
int gets(s)
char *s;
Printf is used for formatted output to
STDOUT.
int printf ( fmt,argl,arg2, ... )
char *fmt;
Its function is to process the fmt
string and output the arguments as
directed by the fmt string. The fmt
string is a nyll terminated string
made up of arbitrary text possibly
containing one or more format
specifiers. I here should be one format
specifier for each argument in the
function call. Any characters not
part of a format specifier in the fmt
string are passed directly to the
output.
Scanf is used for formatted input from
STDIN.
int scanf ( fmt, argl,arg2,. . .)
char *fmt;
The format specified by fmt defines
how an input line should be processed.
Since all parameters in C are passed
by value, the arguments to scanf must
be pointers to objects of the
corresponding types.
Ungetc pushes the character c back to the
file with the file pointer fp.
ungetc(cfp)
char c:
FILE *fp;
Ungetchar is the same as ungetctc, STDIN).
ungetchar(c)
char c;
A format specifier has
form:
the following Unlink attempts to delete the file whose
$[^]lw][.m] conversion character >
where "J M signals that a format
specifier is beginning, the dash (if
present) changes the default right
justification of tne field to left
justification* the "w M (if present) is
the width of the field in characters,
and the ".m" argument (if present) is
the maximum width allowed in string
conversions. If the M w" argument has a
leading zero, the area of the field
not filled by the conversion will be
padded with zeroes. Otherwise, spaces
are used to fill out a field.
The allowable conversion characters
are as follows:
- decimal integer format (signed)
- unsigned Integer format
- hexadecimal notation [no leading Ox)
- octal notation
* single character
., - null- terminated string
e - float or double format (exponential output)
f - float or double format fc'
g - e or
« [decimal output)
f format, whichever is shorter
Putc sends a character to the file with
file pointer fp.
int putc(c,tp)
char c;
FILE *fp;
Putchar is the same as putc(c, STDOUT).
int putchar(c)
char c;
Puterr is the same as putc(c,STQERRL Its
output will thus normally be sent to the
user's terminal even if STDOUT is
redirected.
puterr(c)
char c;
Puts is the same as fputsts, STDOUT).
int puts(s)
char *s;
Unlink attempts to delete the tile whose
name is given by the null -terminated string
pointed to by name.
int unlink(name)
char *name;
GENERAL FUNCTIONS
Abs returns the absolute value of its
argument.
Int abs(n)
nt n;
return (n>=0?n:-n);
Exit terminates the C program and returns
to the operating system; the argument may
be used as a program return code if the
implementation and operating system support
program return codes.
?xit(i)
int l ;
Max returns the larger of its two
arguments. Some implementations allow more
than two arguments to max.
int max(x,y)
int x,y;
return (x>y?x:y);
Min returns the smaller of its two
arguments. Some implementations allow more
than two arguments to min.
int min(x,y)
int x,y;
return (x>y?y:x);
Movmem moves a block of memory length bytes
long from the address given by from to the
address given by to. It is often used to
move structure members, since they may not
be assigned directly. It usually ensures
that tne move is done properly if the
source block overlaps the destination
block. to prevent replication. Many
68* Micro Journal
July '86
17
implementations do not provide the movmem
function,
movmemf from, to, length)
char *Trom t *to;
int length;
Sizeof returns the size (1n bytes) of Its
parameter object, which may be of any type.
In many Implementations, slzeof 1s not a
function, but is a part of the language,
but the difference 1s normally not
Important to the user.
sizeof(object)
MEMORY MANAGEMENT FUNCTIONS
No known Implementation supports all ot the
following memory management functions. Ihe
user attempting to port a program which
calls memory management functions to a new
implementation must investigate those
provided by the new implementation.
Alloc attempts to
block of memory ot nbytes
return
bytes
a pointer to a letters.
char *alloc(nbytes)
int nbytes;
Brk requests that the program's addressable
data space include address.
brk(address)
int address;
Calloc attempts to return a pointer to a
block of memory of n times size bytes,
cleared to hex zero,
char *cal)oc(n,size)
int n,size;
Cdata requests that the program's
addressable data space include address, in
a contiguous manner.
cdata(address)
int address;
Free deallocates a block of memory
previously allocated by alloc, malloc, or
realloc.
f reel block)
char *block;
Malloc attempts to return a pointer to a
block of memory of nbytes bytes.
char *malloc( nbytes)
int nbytes;
Realloc attempts to free the space pointed
to by ptr and then attempts to return a
Eointer to a block of memory of nbytes
ytes,
char *realloc(ptr, nbytes)
char *ptr;
int nbytes;
Sbrk attempts to return a pointer to a
block of memory of nbytes bytes, lhe space
pointed to by U may not later be freed.
char *sbrk(nbytes)
int nbytes;
STRING AND CHARACTER FUNCTIONS
Inalpha tests the character c for
alphabetic.
inalpha(c)
char c;
return (isupper(c) ! lislower(c)) ;
Isdigit tests the character for being
within the range ( T 0\.. 9').
1sdig1t(c)
char c;
return (c>= , , 44c<= , 9' );
i
Islower tests the character tor lower case
le
islower(c)
char c;
return (c>- B a B Mc<«'z a );
Isspace tests the character for blank,
newlfne, or tab.
isspace(c)
char c;
return (c=' a ! lc=\n- ! !c= , \f );
Isupper tests the character for upper case
letters,
isupper(c)
char c;
return (c>= , A , 44c<='Z' );
Atoi converts the given string, which is
assumed, to be a sequence of digits
ro\..'9'h Into a binary integer
representation.
int atoKs)
char *s;
Itoa converts its Integer argument into a
character string pointed to By s.
int 1toa(n,s)
int n:
char *s;
Reverse reverses the characters of the
null -terminated string pointed to by s.
reverse! s)
char *s;
char *b t *e,c;
for £b=s;e=b+strlen(s);*b)
c=*b;
18
July 85
'68' Micro Journal
Sprintf is similar to printf except that
tne formatted line is placed into the
string pointed to by line.
sprintf(line.fmt,argl,arg2,. . .)
char *line t *fnit;
Sscanf i§ similar to scanf except that the
string pointed to by line is scanned to do
the input conversions.
sscanf (line, fmt J argl l arg2,
char *une,*fint;
)
Strcmp compares its
argument strings s
negative value it s <
positive value if s >
int strcmp (s,t)
two null -terminated
and t, and returns a
t, zero If s == t, a
Strsave attempts to make a copy of the
null -terminated string pointed to by s into
an area of memory obtained by a call to
alloc.
char *strsave(s)
char *s;
char *p,*alloc(); , . . fct
if Up=alloclstr1en(s)+l))l-HULL)
strcpy(p,s);
return (pi;
char
I
s,*t;
)
while (*s==*t)
if (*s++=='\0')
return (0);
return { { (1nt)*s)-( (1nt)*t) ) ;
Strcpy copies
pointed to by
by s.
strcpy(s. t)
the null -terminated string
t into the string pointed to
char
}
t;
while (*s++=*t++);
Tolower converts upper case letters
lower case; it converts other characters
themselves.
char tolower(c)
char c;
return (isupper(c)?(c+32):c);
Toupper converts lower case letters
upper case; it converts other characters
themselves.
char toupper(c)
char c;
return (islower(c)?(c-32) :c);
to
to
to
to
SUMMARY
Strlen returns the length of
null -terminated string pointed to by s,
including the nuM character.
the
not
int strlen(s)
char *s;
for (p=
return
(p-s);
+ +P);
This chapter completed the tutorial begun
in the previous chapter. If you have
access to a C compiler, use it. It you do
not have a copy of The C Programming
Language" by Kermghan and Ritchie, buy it.
Enter and run several of the programs in K
& R. *
l:
**
■«*
**
EXAMPLE C FUKCTIOHS
Following 1s a set of example C functions
which illustrates the use or pointers,
addresses, and several other concepts. It
also illustrates ttie tact that C programs
may be written very
implementation-dependent. At this paint,
the reader should be able to understand
every point of the language used by this
set of functions,
formatted print functions
These routines are tricky since they maY be
These versions are non-standard in that they
require the number of parameters to appear as
the last parameter.
fprintf (a,
int *a,
I
int
char
mt » v.
fmt (fft, *fmt, bufl;
eturn Tfputs louf, frntUIM;
»fmt;
buftl40J;
*/
/♦
#*
V
printf
Jnt
I
*/
printf ta
Format and print to standard output
n}
n;
int
char
♦fmt;
bufLMOJ;
fmt ■ 4a
fmt (fmt.
mt (fmt, *rSnt, buf):
turn (fputs (fruf, stdout));
l:
Format into memory at the address given.
. n)
nt *a, n;
int *fmt;
fmt - |l ♦ n:
_fmt (fmt. *fmt, fmtUJ);
/*
V
fmt
Tnt
char
Format and print to an i/o stream.
t
workhorse function.
(argptr t format, bur)
*5rgptr;
♦format,
*6uf;
68' Micro Journal
July '85
19
char
c,
oadcrtr,
tstr,
j tbuf[30J;
boo! ljust. zpad.
tsfull;
Int
I,
padten.
len.
fftc
IdtM
If (lJust i ttc - M
>for©at*+) -* '-'))
c • *for«at*+;
if Upad * (c ■- V)) 1
padchr ■ ;
c ■ *format**;
i
else
oadchr * ' :
for Cfldwldth ■ 6: Hdlgit (c);
c • * forma t++)
If <c « r ') {
pryc ■
JMle (
J
else
Isdigit (c - *format**)J
prec ■ prec * 10 ♦ c - '0 ;
prec
10000;
tour:
tstr ■ tbyf
tsfull
switch
case d'. t
Uoa (•—argptr. -10. tstr);
break;
cast I 2 ,
Uoa (•— argptr, 16, tstr);
break;
case o :
Uoa (*— argptr, 8, tstr);
brea>;
case u :
ttoa I*— argptr, 10, tstr);
break;
case *b :
Itoa (*— argptr. 2, tstr);
break;
case 'c':
•buf** • *— argptr;
tsfull ■ FALSI;
break;
case 'i :
tstr ■ •— argptr;
M break;
defauTU
*buf>* • c:
tsfull ■ FALSE;
break;
U If len - strlen (tstr)) > prec)
en ■ prec:
If Upadlen - fldwldth - len) < 0)
oadTeit - 0;
1f (ljust)
buf -strncpy <buf, tstr, len);
for (T - 1; 1 <■ padlen; !♦♦)
±buf++ ■ padenr;
If (ljust « 6) t
Duf • strncpy Ibuf, tstr, len);
else
*buf+* ■ c;
ibuf • HULL;
68000 User Notes
Phillip Locido
2320 Saratoqa Drive
Sharpsville, Pa 16150
Things have picked up since last month, so I
am not at a loss for subjects. For one
thing, I now have a computer with a full
megabyte of RAM, with a total upgrade cost
of about $210. For another, I have a new
upgrade of OS-9/68K, which seems to have
reached a stable state, so 1 can now get to
work on the C compiler Tve had for several
months but have been unable to use.
MacWalt So«e MacHore
One thing hasn't changed since last month.
I am still without the Inside Macintosh
manual, even though it was ordered six and a
half week 8 ago. Not to fear, though! Tve
managed to track down the reason for the
delay. It seems that Apple reduced the
price for IM from $100 to $25. People who
sent in $100, but haven't yet received their
books, will instead have their money
returned, along with a note to resubmit the
order with a check for the new price. Why
not just send a book plus $75? Ya got me!
Anyway, I'm not about to wait for Apple to
get around to refunding my $100. As soon
as I heard about the reduced price, I sent
in a new check. Supposedly, orders are now
being filled with only a two day turnaround.
If that's true, then I should have my copy of
IM in another day or two. By next month's
column, I should have something halfway
intelligent to say about programming the
Mac.
The address to order your copy of Inside
Macintosh is:
Apple Computer Inc.
467 Saratoga Ave.
Suite 621
San Jose, CA 95129
This is the address for IM orders only! The
books now being shipped are just
photocopied sheets. If you're not in a
hurry, you might wait for the published
version, though I'm not sure when that will
be available.
Mega Mega Mega!
As I mentioned last month, the price for
41256-type 256K dynamic RAMs has recently
fallen precipitously. I just bought 34
chips (2 extras for spares) at $6.25 a chip,
or $212.50 plus shipping for a full megabyte
20
July '85
'66' Micro Journal
of memory. By the time this column appears, capable of handling over a megabyte, in
you should probably be able to find them for which case these switches address the board
less than five bucks a chip. to the proper megabyte.
Performing the upgrade was not as simple as
plugging the 41256s in place of 4164s in my
memory board. I have a Haselwood DM-256
board, which was not planned with the
upgrade in mind. Fortunately, the wiring
changes are not too extensive. For those
of you who might be interested in doing your
own upgrade, this is how to go about it.
First, it is a good idea to mark the changes
directly on the schematic of the DM-256,
just so you will know exactly what has been
done to your board. You should have the
schematic and the board layout sheet so you
can translate the chip numbers I will use to
the actual chips on the board. Also, be
extremely careful when making the wiring
changes. 1 tack soldered the required
wires on the back side of the board, and it
is very easy to accidentally form a solder
bridge to an adjacent pad or line.
The major board change involves wiring pin 1
of the RAM chips together. Daisy chain a
wire on pin 1 of each row of RAKs . The four
rows consist of U30 to U37, U38 to U45, U46
to U53, and U54 to U61. Each row is
individually wired, and is not connected to
the other rows (yet). Rather than wiring
pin 1 between each chip in a row using 7
small wires, 1 used one large wire, and
carefully stripped the wire in 7 different
places, moving the insulation apart to give
me enough bare wire to wrap around each
socket's pin 1.
The other wiring additions are as follows.
To connect the RAM pin 1 wires to the
address line multiplexors, wire U13 pin 15 to
U30 pin 1 and U38 pin 1, and wire U20 pin 15
to U46 pin 1 and U54 pin 1. The
multiplexors are wired to the address lines
by wires from U18 pin 7 to U 13 pin 12 and
U20 pin 11, and from U18 pin 4 to U13 pin 11
and U20 pin 12. Wire U5 pin 14 to U5 pin
15, changing the board selection logic.
Finally, U13 pin 9, U13 pin 10, U20 pin 9,
and U20 pin 10 must all be connected to a
convenient ground, such as U13 pin 8 and U20
pin 8.
Only one line must be cut on the board.
Find the trace from U18 pin 7 to U5 pin 15,
and cut it by scratching through the line
with a knife. Finally, set switches 1, 2,
and 7 open, and switch 8 closed. Open
switches 3 to 6 unless you have a system
A warning - this upgrade should obviously be
undertaken with much care. It is best if
you can understand the reason for the
changes I made for yourself, just so you can
be sure that I made no errors in my
description of the upgrade.
I was lucky. After making the changes, the
board worked properly the first time. I
booted up OS-9/68K, and was told that 1012K
of RAM was present. It seems that osy CP-08
68008 board hides L2K of the RAM, which is
therefore not available to the system. I
have no memory test programs, but since
loading an OS-9 module involves a CRC
calculation to check module integrity, I
simply loaded the memory with many programs
to make sure the RAM was working.
As you might expect, a full megabyte of RAM
is going to be very useful. RAM disk
drivers are included in 0S-9/68K, so I
reconfigured my system with a 256K RAM disk.
I then changed my startup file to move
everything from my DEFS, LIB, and SYS
directories to the RAM disk, and to load
many commonly used utilities, the screen
editor, and the various C compiler phases
into RAM, After all this, I still have about
3 50K free, and the boot only takes about a
minute. C compiles are now done with
temporary files written to the RAM disk, so
the only time the hard disk is accessed
during a compile is when the source file is
read and the final object file is written,
resulting in C compiles that take only half
a minute.
Presenting the NSW OS-9/68K
Version 1 . 1 of OS-9/68K (OSK for short) is
now out. If you're still running an old
version, get the update. This new version
is more stable and bug-free than previous
ones, with several new utilities and
features. I'll go through some of the
changes here. Some of these were first
implemented under version 1.0, but I didn't
do much of anything with that version, since
the C compiler that I have (version 1.2) only
works with OSK version 1.1.
First, the formats of various internal
headers and tables has completely changed.
Module headers are now a minimum of 48 bytes
long, with many bytes reserved for future
expansion. For Instance, there is a module
'68' Micro Journal
July 85
21
field reserved as an offset to a symbol
table, to be used in a future symbolic
debugger.
Hlcroware has continued adding new
utilities. Perhaps the most useful is aake,
which I have been wanting for a long time.
This is a program that automates the
production of large software packages, that
I have mentioned before when discussing
Unix. It is a very complete version,
implementing many of the abilities of the
Unix version, plus others useful in the OSK
environment. The screen editor, scred, has
been improved, with a new setup program to
simplify configuration of the editor for a
new terminal.
An Electronic Stopwatch
Now that I have a version of OSK matching my
version of the C compiler, I finally managed
to put together a useful program for this
column. The C program, tiae, is patterned
after the Unix utility of the same name
(surprise, surprise). It will run another
program, displaying the total execution
time, time spent in the system state, and
time spent in the user state. Time is
spent in the system state while a process is
busy executing an 0S9 trap, and in the user
state when executing code outside of these
traps. Time spent waiting for I/O or other
resources will not be counted in system or
user times, but will affect the total
execution time.
Tiae is made possible by several entries in
the OSK process descriptor. The process
descriptor is an internal OSK table that
holds all of the necessary information for
controlling an executing process. This is
the data table from which the procs utility
derives its information. The entries that
are used by tiae record the time when a
process started, the number of ticks spent
in the system state, and the number of ticks
spent in the user state.
There are more new entries in the process
descriptor that hold useful information,
even if they don't really have anything to do
with the execution time. Thus, as an
option, tiac will display the number of F$
and 1$ 0S9 calls made by a process, and the
number of characters read and written.
These are the same extra data items
available in the new procs command.
Tiae is easy to run. Instead of typing a
normal shell command, just prefix the
command line with "time M , or "time -e " if
you want the extra information. Time will
run the command, then examine the process
descriptor when the command is finished, and
print its summary,
Tiae manages to stick to the existing OSK
conventions for utility programs. An option
is specified by preceding it with a dash,
and an option of *-Y will cause a short
usage summary to be printed in the normal
format established by the Hlcroware
utilities, I consider these conventions to
be very important, since some uniformity
among programs can make working under OSK a
lot smoother.
There are some limitations to time. Since
the command is forked directly, instead of
calling the shell, tiae cannot handle
procedure files, only executable programs.
Also, the times reported are only those of
the forked command. If that command Itself
forks to other modules (like cc), the sub-
module times will not be included. This is
a problem with OSK, and tiae can't do
anything about it.
Dissecting Tiae
There are a few interesting points to be
examined in tiae. For one thing, the
command line arguments must be specially
handled. Normally, the command line is split
into individual arguments before being
passed to aaln(). In addition, special
characters like quotation marks are
processed and removed. In tiae, though, we
don't want the command line to be split into
individual arguments, since the os9fork()
function wants a single string with command
name and arguments all together. Neither
do we want any special processing of
characters in the command line.
Under the current C compiler and OSK, the
command line processing is done by a routine
called __initarg, which is called from the C
startup module, cstart.r, The default
_JLnitarg is found in the C library, and can
therefore be replaced by defining a new
version in the object code before the
library is searched. This is done in tiae.
The routine, which must be written in
assembly language, is passed a pointer to
the command line in AO, with a pointer to
the module name on the stack. It should
create the normal argc and argv parameters
on the stack, in preparation for calling
aaia(). The replacement routine just
returns an argument count of two. The
22
July "85
66* Micro Journal
first argument Is the module name, as
normal, and the second Is the command line,
with no special processing done.
There Is another assembly language routine
required, to use the 0S9 service request
F$GPrDsc, that copies a process descriptor
Into a program's buffer for examination.
This routine Is straightforward, using the
Mlcroware C conventions for argument passing
so It can be used by C code.
Routines naia() through getargO take care
of doing what processing of the command line
Is required. The start of the command line
Is checked for any options. The name of the
command to be executed Is then pulled from
the command line start. The remainder of
the line will be passed as the parameter
string when forking to the command.
The real work Is done by exec() and pstat().
Kzec() first sets up a signal handler. This
handler will send any signals Intercepted by
tine on to the command being executed.
Next, the command Is begun, with a call to
os9fork().
and checks the process descriptor after
each sleep to see if the command Is
finished. When It Is, the results are
output, and valt() Is finally called, allowing
the process descriptor to be released.
The routine pstat(), which prints the
results, reads the current time. Note that
the _sysdate() call to do this differs from
that In the C manual, which is inaccurate.
Since the starting time, from the
descriptor, and the ending time are both In
Julian time, time elapsed is simple to
calculate. The _sysdate() call also returns
the number of ticks per second, so the
system and user ticks from the descriptor
can be converted to seconds.
Enough on how it works. The only thing left
is actually compiling It. The command to do
this Is M cc time.c -ix ,r . This causes the
final code to use the cio and nathl trap
packages, so the code length Is under 3000
bytes, Instead of over 10000, which Is the
result If the trap packages are not used.
Enough Already
After the command has started, tine must
wait for it to finish. A simple call to
wait() does not work, since wait() would
return after the command has completed and
its process descriptor Is freed. Instead,
tine repeatedly sleeps for half a second,
gun a program aod print the execution tlae etatlettce
tfhen finis bad.
Syotsiu tlew |<opte>] CshelL cmd>
Options:
-* Print eetro Information
Prints the real, system, sod user execution times.
With Che -e optlos, extra loiormstlos about toe ouaber
and type of 059 calls mads sad number of bytes read
and written Li printed.
Philip Luc Id o, April 10, 1965
■Include <etdlo.h>
'Include (module. h>
■Include <pretld.b>
'define TWI 1
f define FALSI
fcatembly lsofuafe routinee. Some aeaembl/ language Is
required to teU directly to 0« st s lower level than
normal lo C.
This is probably the longest column I've had
yet, especially with the listing. Ill stop
here. Back next month with more on the new
OS-9/68K and C f and with any luck, a copy of
Inside Macintosh. (Late Flash - no book,
but 1 did get my §100 check back. At least
Apple knows I exist.)
* Staple cement routine for ergument procession to srgc sod srgv,
* Returns ergc - 2, argv(0] - module Dame, argvll] - entire
* parameter itrlng.
_lnlcarg; moves. 1 (a7)+,e6
■ove.l (a7)+,d0
mowsm.l d0/e0»-(s7)
P« t*7)
pea 2
Jmp ta5>
return addreea to s5
pop module name pointer
creete argv[0.»l) on stsck
srgv m addrees of array
argc • 2
return to catert
* toterfece for PSCPrDec, which coplee a proceea descriptor
* into a buffer for Inspection. Colling sequence from C Is:
* lot _fprdec(pld,lao(tb, buffer)
* lot pld; /* process Id */
* lot lenfth; /* number of bytee to get */
* procld ^buffer; /* proceee deecrlptor buffer pointer ■/
* fteturoe if eucceaefu.l, -1 If error, with error code In
* 'ermo'.
_gprdec: movem.l dl/e0,-(e7) (Is this oeceeosry?)
moves. 1 I2(a7).a0 buf eddr - dO/dl already eet
os 9 PSCPrDac dolttolt
bca.e gprdscl
moveq #0,d0 success * no error
brs gprdsc2
gprdscl move. I dl,erroo(e6) error- save error cods
aoveq P-l,d0 rsturn Indication of error
gprdsc2 movem.l (a7)+,d J/aO restore snd return
•sib,
68 r Micro Journal
July 65
23
Jendaen
Declare pr^fTu global varlehlea
int opte; /• -a - dlepLey extra lnfofmatloo •/
let child; /■ proceee ID of aaec.utlag child •/
procld prd; /' proceee daacrlptor table Cor child procaaa ■/
•/
Start of program
pi - *pp;
while (<c - «p|) — * ' H c — 'U')
♦♦pi ;
p2 - pi;
vhlla ((c - *pl) f- -\0- U c !- " il c t- *\t')
♦-•pi;
•pl^ • '\0';
while ((e - «pl) — ' ' I) c — '\t')
♦♦pi;
•pp - pi j
return p2;
/• try to gat command name */
/• do command - quit */
/* — amend near gottaa */
/* alaa opt loo argument */
/* do actual work •/
meln(argc.erge)
raglatar lot arge;
raglatar lot 1;
char *peraaetr;
raglatar char *argj
char ■getergO;
paraaetr - argv[ l);
Cor (;;) (
art " gotargCaparaaatr);
If (*erg — *\0*)
exlt(O);
If ("erg r- '-')
break;
optlon(erg);
}
exec(erg.paraaetr);
\
/•
Procaaa an option argument
optloo(p)
register cher a p;
i
regleter cher c;
while (c - •++p)
ewltch (c) {
ceee 'a':
opte - Tltfg;
breek;
caaa '?':
ui'itO;
exlt(O);
dafaulti
a x 1 1 (_e r r meg (1," unknown option *Xc'\d" ,c)) ;
Do the actual work. Start the prograe, welt Cor It to die,
end print the timing InCo when It doee. If the child
proceaa return* en error, then thla Cunctlon exit* with tha
eeae ttetue.
exec( name , pares)
regieter cher 'dim;
regleter cher a perem;
I
lnt elgbaii4la<);
unalgned atatua;
/• algnel Intercept handler ■/
/■ returned etetue froa child */
lotercept<flghendle); /• intercept algnala ■/
child - oe9Cork.(fieate .atr leD(par*e)+l .peraa, 1 ,0,0,0);
If (child — -1)
do { /■ main loop - wait Cor prograe to die ■/
telccp(OxBOOOOOSO); /■ alaep Cor 0.5 aaconde •/
it (_Fprdec(cblld.elteoC(prd).*prd) 1)
«xlt(_ernbftg(erreo, M cen't read procaaa deacr - **)>;
) while <prd._queueld I- '-*);
petatC); /a prlot the etetletlce •/
waltUetntue); /* allow chlid to go evey ■/
1C (atatua)
exlt(_errmeg(atatu», "error lo child procaaa - "));
Signal beadier - IC child aterted, then Juet p*ea tha
algnel on.
elghendle(elguel)
lot elgnel;
I
If (child > 0)
fcllHchlld. elgnel);
/•
Print the prograa uaego euaaary
ueageC )
I
CprlotC(e(dorr, "Syntax: time (<opta>) <cmd>\n");
CprlotC(*tderr, "Function; Time the execution oC a prograeVo**);
C print Katdar r , "Opt lone : \n" ) ;
CprlotC(ate\err,"\t-*\t\tPrlnt eetra lnformetlonVn**) ;
Extract the next argument froa the erfuaent etrlng.
terminate it, end update the pointer to the remainder oC
the etrlng. letnree tha oe-xt erguaent polotcr,
Slaple eereloo - Skip Initial blenke and tabe, Cln4 next
hlenk nr tek, terminate erguaent, end ekip trailing blanke
and tebe. Doee no epeclel proceeetag oC quotee, coaui,
or becaeleehee.
cher "gacarg(pp)
regleter cher ■■pp;
•/
After child proceee le complete, print the tlalng data,
and other dete If requested to by option ~e.
pntetO
unalgned dete, limt, tick;
ehort dey;
raglatar unalgned reel; /a time eloce atari. In aece ■
regleter unalgned tpe; /• tlcka per aecond ■/
/■ tfaJtXI*; - eyedeteO cell dlCCere Croa manual ■/
_eyedete(3.*tlme,4dete,4dey.4tlek);
tpe - tick » 16;
reel - (dete - prd ._detfceg) ■86*00 ♦ (time - prd.tiabag);
CprlotC(etderr, n \olaal X9d\n".rael);
CprlntC<etdarr."Ueer X12.2f\o".
(double) prd._utlcke / tpe);
CprlntC(etdarr. N Syatee Xl2.2f\u".
(double) prd. etlcke / tpe);
IC (opte) (
fprlntC(etderr."\nrS cell. X9d\n**.prd._Ccalle) ;
fprlntf(etderr,"15 calla X9d\n N ,prd._lcelle);
fprlotC(etderr. N lytee raed X9d\o".prd. rbytee);
fprlntC(etderr,"lytea written X9d\n".prd/wbytaa);
regleter cher ■pi;
regleter char *p2 ;
regleter cher c;
24
July B5
'68* Micro Journal
ADA R
And
BY
THEODORE F. ELBERT
THE UNIVERSITY OF WEST FLORIDA
PENSACOLA, FLORIDA 325H
In Part 2 of this series, several
general design goals of software
engineering were introduced. These general
design goals are:
modifiability
reliability
portability
- efficiency
- understandability
- reuseability.
Each of these goals is discussed below, and
the language features that promote
achievement of that goal in an Ada program
are Identified.
Hodif lability. As the name implies, this
property refers to ease with which
controlled change may be incorporated into
existing software. Embedded computer
systems in particular have a need for
software with this property, because of the
many modifications made to operational
software over the life cycle of the system.
Important to achievement of modifiability
are
- controlled change: the absence of side
effects that cause
unexpected
modification of
program behavior.
- self-documentation: the software itself
should reflect the
underlying
algorithmic design.
- management of complexity: software
modifications
should not Increase
the complexity of
the solution
represented by the
software. :
Typically, modification to software is often
performed by programmers other than those
involved with the original design, and it may
be performed at a site other than that at
which the original design was developed.
The
68000
Part 3
SOFTWARE
EIlGinEEAinG
ASPECTS
of the
ADA
LAI1GUAGE
The Ada language features of strong typing,
generic units, packages, and separate
compilation serve to enhance the
modifiability of software.
Efficiency. The term efficiency, in this
context, refers to use of hardware
resources and execution time by compiled
code. While compiler efficiency — referring
to the use of time and resources by the
compiler — may be of some interest, the
embedded system programmer is much more
concerned with the execution
characteristics of compiled code on the
target machine. In the embedded system
environment, optimization with respect to
either execution time or with respect to
computational resources may be required.
Furthermore, a single program may require
execution time optimization in one part of
'68' Micro Journal
July *85
25
the program and resource optimization in
another. In the development of the Ada
language, any proposed feature for which
efficient implementation could not be clearly
envisioned using standard compiler design
techniques was rejected.
Reliability. The general concept of
reliability — as applied to software —
concerns the question of whether the
software will perform its intended function
accurately under normal conditions, and
whether it will do so consistently.
Abnormal conditions should never result in
erroneous performance masked as proper
performance. Instead, the software should
be able to recover from such conditions or,
at the very least, continue execution with
reduced effectiveness — a property known as
graceful degradation. Thus, the software
should avoid catastrophic failure which
results in program abandonment by the
underlying operating environment.
The reliability of software is
dependent upon the correctness of the
design specifications, upon the correctness
of the mapping of the design to the software
implementation, and upon the ability of the
software to recover from exceptional
conditions if they should arise. For large
programs, it is often difficult or impossible
to produce a requirements specification
which is complete and invariant, simply
because of the sheer complexity of the
problem. Furthermore, in the case of
embedded systems, the hardware design may
be taking place concurrently with the
software design, or the system operational
requirements may be in a state of almost
constant change. In this situation, the
correctness of the design is a nebulous
concept, so that one can never be sure of
absolute reliability, even if the mapping of
the design to the software implementation is
known to be correct. A realistic definition
of software reliability is "that a program
should meet its specifications, should never
produce "incorrect" output regardless of the
input, should never allow itself to be
corrupted, should take meaningful and useful
action in unexpected situations, and it
should completely fail only when further
progress is completely impossible,"
To achieve a high level of reliability
in software nearly always requires a
reduction in code efficiency, since features
such as data checking and exception
handing require a large amount of extra
code and usually entail an increase in
execution time. It is generally conceded,
however, that reliability is cost-effective
in the modern embedded system application.
Some of the reasons for this concession are
- The cost of system failure could be
immense, not only in terms of equipment
failure, but also in terms of human
lives.
- The tendency today is towards increased
hardware capability at lower cost and
smaller size,
- It is much more difficult to improve an
unreliable system then it is to improve
an inefficient system,
- Inefficiency is immediately apparent.
Reliability problems are much more
insidious, and therefore are more
capable of causing damage.
- As a market consideration, unreliable
software will not sell, regardless of
the efficiency, :
In later parts of this series, the reader
will see several features of the Ada
language which promote reliability in Ada
programs. Language features such as strong
typing and separate compilation tend to
ensure the correctness of the mapping from
the design to the software, while the
exception handling capability of the
language permits a program to recover from
unexpected situations,
Qnderstandabllity. The understandability of
software relates to the extent that an
observer can grasp the functional aspects of
the software, and the relationship between
the software and other system components.
In order for software to be understandable,
its very form must imply to an observer the
structure of the design being implemented.
This concept extends well beyond the
mnemonic use of meaningful data names and of
ample commenting. It includes the use of a
meaningful coding style, the use of an
appropriate structured design methodology,
careful selection of how data is structured,
and the incorporation of other features
that respect the role of programming as a
human activity. The ease of maintenance of
a program obviously depends upon the
property of modif lability — that change can
be incorporated easily and without harmful
side effects of an increase in complexity —
26
July 65
68* Micro Journal
and the property of understandability --
that the manner in which the design is
mapped to the software implementation is
easily comprehended.
The understandability of the software
implementation of a design can be highly
dependent upon the implementation language.
Since one of the primary concerns of the Ada
language development effort was the
realization that programming is a human
activity, one finds in the language many
features that can serve to enhance the
understandability of Ada software. The
strong typing, the modern control
structures, and the data abstraction
features of the language are examples.
Portability. Portability refers to the ease
with which software can be moved from one
computer to another. In an era of rapidly
escalating software costs, it seems only
reasonable to incorporate features that
enhance the portability of the software
design, even at the expense of increased
development costs. The idea of portability
is not new, of course, since any high order
language is portable to some extent. Only
assembler programs are perpetually tied to
specific hardware. The degree of
portability differs among high level
languages, and depends upon the particular
implementation of the language on the
underlying machine. In the embedded system
environment in particular, a program written
in a high level language often must depend
upon assembler language subprograms to
exploit some feature of the underlying
hardware, or upon the underlying operating
system for features like task
synchronization and exception handling.
Current practice is to enhance the
portability of programs by isolating those
sections of code that are dependent upon
either the underlying hardware or the
underlying operating system. The most
prevalent method of achieving this isolation
is through the use of replaceable
subprograms. Moving of the software from
one machine to the other then requires
replacement only of these subprograms •
A high degree of portability is
inherent in all programs written in Ada,
because they are virtually independent of
the underlying hardware and operating
system. Access to features of the
underlying hardware and of the operating
system is provided in the Ada language
itself. The burden of providing this access
is borne by the Ada compiler and run-time
support software. Furthermore, the Ada
language itself has been protected against
the use of subsets or extensions by the
fact that the name Ada has been
copyrighted. Before any compiler can be
called an Ada compiler, it must be validated
by the Department of Defense; such
validation requires that a compiler
successfully pass a battery of some two
thousand different tests designed to
validate conformance with the language
specifications.
Not only do these features enhance
program portability, they also ensure that
programming skills are portable from one
working environment to the other — an
important consideration to the highly mobile
professionals in the defense industry. To
further enhance the commonality of work
environments, a standard Ada Programming
Support Environment (APSE) has been
specified, so that the programmer is
provided not only with a standard language,
but also with a standard set of software
development tools .
Reuseability. While portability refers to
the ease with which software can be moved
from one machine to the other, the term
reuseability is used to describe how well
software components lend themselves to use
by independent programs. The concept of
reuseable software is not new by any means.
For some time, programmers have made use of
subprograms called from standard support
libraries to achieve the implementation of
commonly used algorithms. In the
development of reuseable subprograms, care
must be taken to preserve the integrity of
the calling environment, and to provide an
efficient interface between the subprogram
and the calling environment. But the
concept of reuseability can be extended
beyond the reuse of a subprogram. Such
things as data structures, groups of
physical constraints, or data itself can be
reviewed as reuseable resources. In Ada,
the concept of reuseability is given wide
applicability through the package and
generic unit features of the language.
NEXT: Ada's Program Units.
Ross, D. T., Goodenough, J. B., and Irvine,
C.A., "Software Engineering: Process,
Principles, and Goals, Computer 65 : (May,
1975).
'66' Micro Journal
July '65
27
A DISK IS BORN
Basic OS-9
by Ron Volgts
DUMP /DOS
Up to a few years ago I considered a
computer disk to be a convenience. It
would store programs and save data for
later use. What else could you say for it?
If you initialized one disk you Initialized
them all. Although the systems I had
worked on varied, creating a diskette was
about the same. Usually some command was
used like INIT or FORMAT. The disk drive
would take off clicking away, marking off
where track and sector information was to
be located. A directory was written on
one of the tracks to hold the names and
location of information on the disk. And
that's all there was, until OS-9 came
along.
The first time I initialized an OS-9
disk, I figured, "Well here we go again!" I
put the disk in drive /Dl and typed:
F08HAT /Dl
The drive came on as before and started to
click away. Then it stopped and replied:
COLOR COMPUTER DISK FORMATTER U2
FORMATTING DRIVE /Dl
T (YES) OR N (MO)
READY?
Well this seemed like a reasonable request.
So I replied with a "Y" and away we went.
Before long it stopped and asked:
DISK NAME:
At that moment I felt very personable with
the disk. It was no longer a face in the
crowd; or rather, a disk in a box. My disk
was an Individual. It had a name!
The best way to find out what is on
that circular piece of plastic is to let
OS-9 show you. There is a nice little
command in you commands directory called
f, DUMP M . DUMP will list to your display a
file's contents in both hexadecimal numbers
and ascll characters. If a particular byte
can not be represented with an ascli
character, it shows a dot to remind you
something is there. Entering:
DUMP MY_FILE
will output a file called MY_FILE to the
terminal. Tack on a tr >/P" and the output
will go to the printer. A nice feature is
that DUMP can be made to treat the disk as
a file. Usually a disk drive is recognized
by a /DO or a /Dl, or something like that.
If a £ is added on, the disk in that drive
can be treated as a file. So if you enter:
26 July
the disk will be dumped to the terminal and
look something like this:
01234567 0246
ADDR 89ABCDEF 8 A C E
0000 00027612004F0001 ..v..O..
0008 0000020000FF4950 IP
0010 02001 2000000000B
0018 303253051FOC3A43 02S...:C
0020 4F4C4F5220434F4D OLOR COM
0028 5055544552204449 PUTER Dl
0030 53CB000000000000 SK
0038 0000000000000001
What you are looking at is the birth
certificate of one of my disks. Officially
this is known as the Disk Identification
Sector. It is Logical Sector Number on
the disk, or LSN for short. The Logical
Sector Number is the way that sectors are
referenced. Instead of referring to the
track and sector number. If there are n
sectors on a disk, the LSN's range from
to n-1 • On my system, disks have 630
sectors, so I can access LSN through LSN
629.
Looking at the bunch of hex numbers
for LSN on my disk I dumped earlier can
make you a bit dizzy. It is easier to map
them out to better understand their
purpose. Here is a breakdown on my disk:
ADDR
SIZE
NAME
MY DISK
0000
3
sector total
000276
0003
1
track size
12
0004
2
map size
004F
0006
2
cluster size
0001
0008
3
root start
000002
000B
2
owner
0000
000D
1
attributes
FF
000E
2
identification
4950
0010
1
format
02
0011
2
sectors/track
0012
0013
2
reserved
0000
0015
3
bootstrap file
00000B
0018
2
bootstrap size
3032
001A
5
creation time
Y:M:D
53051F
H:D
0C3A
001F
32
name
43toCB
COLOR COMPUTER DISK
Much of the information stored in LSN
is specific to the particular disk. Is
*65 '68* Micro Journal
it single sided or double sided? Is it 5"
or 8"? Maybe it's a hard disk! When was
it created? How large is the disk? It's
best if I give you an Interpretation for my
disk.
First, this table shows that my disk
has $276 (630) sectors on it. (All the
numbers in the table are in hexadecimal,
I'll use them for our analysis, but put
their decimal equivalent in parentheses.)
There are $12 (18) tracks on my disk. The
sector allocation map contains $4F (79)
bytes showing which sectors are used.
There is 1 sector per cluster on this disk,
as is the case on most disks (some large
storage devices, such as a large Hard Disk
or High-speed Tape System, may use 2, 4, or
more, sectors per cluster). A cluster is
the smallest Increment of storage assigned
on a disk. The root directory's file
descriptor is at LSN 2. The disk's owner
is user #0000 (that's me!). It's attributes
are $FF which translate into:
Now You know everything about your
disk. Right? Well, actually we've only
scratched the surface. Another Important
aspect is the allocation of disk space.
Remember the "map size" in LSN at $0004.
Well the map is located at LSN 1. Here is
a DUMP of my disk starting at address $0100
which is the beginning of LSN 1.
01234567 0246
ADDR 89ABCDEF 8ACE
---- +_+,+-+-+-+-+_+- + + + +
0100 FFFFFFFFFFFFFFFF
0108 FFFFFFFFFFFFFFFF
0110 FFFFFFFFFFFFFFFF
0118 FFFFC7F8080FFFFB ..Gx...{
0120 FFFFF87EFFE0D9FF ..x.."Y.
0128 OFFFFFFFFFFFFFFF
0130 FFFFFFFFFFFFFE3C <
0138 21FC000000000 7FB l\ {
0140 0000000000000000
0148 000000000FFFE3FF c.
0150 FFFFFFFFFFFFFFFF
D S PE PW PR E W R
The disk identification number is a
"random" number so that the system can tell
if an unexpected disk swap has occurred.
The format byte is concerned only with the
last three bits. They are:
BIT - number of sides
■ one
1 ■ two
BIT 1 - density
■ single
1 - double
BIT 2 - track density
0-48 TPI
1 - 96 TPI
The format number on my disk is $02. We're
only concerned with the last three bits,
which are:
1 (binary 2)
This means I have a single-sided, double
density, 48 TPI disk. There are $12 (18)
sectors per track. Don't worry about the
reserved 2 bytes. They're not used for
anything. My bootstrap file is at LSN $0B
and is $3032 bytes long. If the
bootstrap's pointer had been 0, it would
mean that this wasn't a bootable disk. 5
bytes are used for the disks creation and
time. And finally comes the disk's name.
It can be a maximum of $20 (32) characters
long. Whew, that's a lot of information!
This shows which clusters are used and
which are not. (And you thought this was
going to get easier!) Actually the map is
not difficult to read. If you remember
from before, my map size is $49 bytes long.
So this map starts at $0100 and ends at
$014E. The rest of LSN 1 is filled with
$FF's. (The $FF's do have some meaning.
My disk is 35 tracks long. If this disk
were put in a drive that could read 40
tracks and the "RS format", it could still
be read. The trailing $FF's tell the
system that the sectors beyond track #34
are used. In reality they don't exist.
There's no chance the 40 track drive will
try to use them.) I didn't print the rest
of LSN 1 since I thought that would be
boring.
The trick is to learn how to read
this. It's very easy. Every byte
represents 8 clusters (which, on this disk,
is 8 sectors). At address $0100, LSN
thru LSN 7 are represented. The next byte
is for LSN 8 through LSN 15. If a bit is
set in any byte then the LS is being used.
If it's cleared, the LS is available. As
you can see, the byte at $0100 and $0101
have $FF's in them. The $FF means all 8
bits are set, so all of these LS's are
used.
Maybe to make it a "bit" clearer (pun
Intended), we can jump down to address
$0122, which holds $C7. Now in binary this
looks like:
110 111
68' Micro Journal
July 85
29
This represents LSN 200 thru LSN 207.
Reading the map from left to right, 200 and
201 are used, 202 to 204 are clear, and
205 to 207 are used. Pretty easy, huh?
Trying to read it may not be the easiest
thing, but every time you write to the disk
this map is read and updated by OS-9 while
you sit back knowing your program is being
saved!
The 0S-9 directory, /D0/CMDS, contains
a command called "FREEV. FREE will tell you
the disk's name and its available memory.
For more information you can use a program
like the one at the end of this months
column. It's called "DISKIIT. The program
was designed to give you a better idea of
what is on the disk. I tried to
incorporate most of the information in LSN
0. In some cases the output is the actual
number; in others it is an interpretation
of the information.
There are 4 parts to this month^s
program. The first part initializes the
necessary parameters. A complex variable
type is created to hold the information
from LSN 0. The second part reads LSN
into id which was created by the complex
variable. The third part does the actual
analysis of the information in variable id.
I left the index of bytes in array id .b in
hexadecimal format since it is easier to
the associate it with the map given
earlier. The output is printed in decimal
form for your convenience. The last part
reads LSN 1, the sector map. This section
is a little slow. If you ever think the
program has gotten lost, it is probably
here working at counting available sectors.
This part could be rewritten in assembly
language, but I wanted to leave it in
Ba8ic09 to give a better idea of how it
works. If you are interested in a C
language version, I think you should have
no trouble converting it. (Right now I
have a sick disk drive. But as soon as
it's fixed, 111 go to work on a C version.)
KANSAS CITY, HERE I COME
I Just received a Basic Language for
Coco OS-9 that I am excited about. It is
KANSAS CITY BASIC (catchy name, eh?). Many
of the old timers will remember the earlier
basics, and may have used KC Basic. Many
of them did not support floating point
math. Only integer manipulations were
permitted. KC BASIC is an Integer Basic.
This version of KC Basic is written by
Steve Odneal. It runs on the RS Color
Computer under OS-9. It handles basic
syntax as well as some specialty items, like
it can read the joy stick ports and it can
pass a process to OS-9. (By the way, Steve
points out that it should also run on
standard OS-9 too.) It does lack a few
things. As I said before, it can't do
floating point math. It also can't handle
arrays. So why am I so excited?
First, it resembles the original RS
Color Computer's basic. If you've
programmed the Coco you'll feel right at
home with this. Another thing is that
Steve supplies the Source Code with it.
That's right! All you hackers will be able
to see how it works. You can even add new
commands if you feel so inclined, or the
floating point math, etc.; if you add
something, send it to Steve for
incorporation into the package. Finally
there is the price. Steve is asking $20 to
cover the price of the Disk and Shipping.
At that price you can't go wrong. If
you're interested, you can write to:
Steve Odneal
8609 East 73 Terrace
Kansas City, MO 64133
Just tell him you saw it here in Basic OS-
9. See ya next time!
PROCEDURE 61 Ik 16
THIS PROCEDURE WILL PRINT A DISK'S
VITAL ItfOWUTlON. EITHER ACTUAL
VALUES WILL 3£ PRINIE0 OR
AN INTERPRETATION WILL U GUfCN.
PROCEDURE SHOULD «€ PACKED ANO
IN /DO/CMOS WITH RV*0.
CALLING SYNTAX:
OISRtOCDRlVE")
DRIVE ON NT SYSTEM IS /DO OR /Dl
(• DIMENSION VAR. AND ASSIGN C0NSTANIS
(• "Dr1*t" Is assed from the outside.
(* Variables 1n arrays arc ass^ntd
(* using READ and DATA statements.
PARAM drive: STR1NG[ 10]
TYPE 1SnO«b(31):*YTE; name: STR I NG£ 32]
DIM IdrlSnO
DIM mtp:SYTE
DIM path, 1, J, k, count, mtPsUe; INTEGER
••)
•)
*)
•)
M
•)
M
♦>
*>
•)
**>
•)
♦>
♦>
•)
OIK M>nth(l2):STR]NG[10]; attr(8): STRING^}
DIM temp, 1sr>l,scoi»nt: REAL
drive :«TRIKt<dr<ve )♦"•"
BASE
FOR 1 «0 TO It
READ aonthO)
NEXT I
DATA "January", "February*, "March"
DATA "A rn","May", "June", "July"
DATA " August", "Set«»l>er", "October"
DATA "November" , "December"
FOR W TO STEP -I
READ AttrM)
NEXT 1
DATA "0", "S\ "Pf", "Pw", "PR", "E", "W\ "R"
(• READ THE DISK'S INFORMATION INTO "ID" •)
(• p*th: path for "OPEN" •)
(• driver name of df sic drive to read fro* •)
(• Id: complem variable to hold disk 1nro •)
{• GET Is uied to read Into the complex ♦]
(• variable "Id" the disk's Information •)
(• from sector LSN 0. *)
OPEN #path,dr1ve:READ
SEEK #path..0
GET #path,1d
CLOSE 'path
PRINT "ID for disk In drive "; LEFTJ(drWe,3)
PRINT "Name: "; Id. name
1:«1d.M$18)-l
J:«1d.b(SK)
k:~1d.b(SIA)
PRINT "Created on: "; month(l); * "; J; ", 1»\ k
IF 1d.b(SlE)<I0 THEN
PRINT THE IDENTIFICATION FOR THE DISK
Id.b: byte array of disk Information
Id. name: disk's name
1, J, k, and temp: temporary variables
month: array of month names
.attr: array of attributes
Thfs section prints disk's information
In most cases PRINT USING is used
unless the printout Is vtry simple or
or some effect Is be1n9 created
tliat PRINT USING wouldn't help.
30
July '65
'68' Micro Journal
EFDSKDU1Q a a
Hmtm tjsjsj csjsj rmm
TSC XBRSIC Programs Compiled to Asmb. tang..
under 0S-9 ?ri . CoCo 0S-9.ur FLEX™ with
^ K-BASIC
**•% TtLKl 991 4HFVT ITH
(615)842-4600 Mk
fjfctll wilt
5900 Cassandra Smith Rd.
Hixson, IN 37343
tor information
Call (615) 842-4601
CoCo OS-9 1 " FLIX"
SOFTWARE
K—BHSIC under 0S-9 and FLEX will now compile
TSC BASIC. XBRSIC, and XPC Source Code Files
lv~ DflZlILa now makes the multitude of TSC ■■■SIC Software
available for use under BS-9. Transfer your fauorlte BASIC
Programs to BS-9, compile them, Rssemble them, end
EQEKBtD — usable, multi-precision, familiar Software Is
running under your fauorlte Operating Systeml
FC — BASIC (BS-9 or FLEH). lacladln ff the ■••easier
$199.00
Sculptor
Microprocessor Developments Ltd. 'a Commercial Ammlicmtlo* Ceoeretor Program provides a FAST
Commercial Application Development tool unavailable to the 0S-9 and UnlFLEX User before. Develop any
Commercial Application In 20Z of the normal required tine; gain eaey updating or cuatomUing. PLUS,
the Application can also be run on KS-DOS and Unix machlneal Sculptor handles Input validation,
complex calculations, and exception conditions as well as the normal collecting, displaying, reporting,
and updating information in an orderly faahlon. Key fielda to 160 bytes; unlimited record size; file
site should be held to 17 Billion records. Utilizes ISAM File Structure and B-tree Key files for rapid
accent. Input and Output connun lest Ion with other programs and files plus a llbrsry of ISAM routines
for use with C Progrsus. Run-time included w/ the Development package; s complied Applicstlon only
needs s Run-time License. Additional charge for Networked Units. Prices for Oewlopmrntit Fmekoge/Ruo-
ttam. Discounts available for purchsses of 5 or more Run-time Packages.
UnlFLEX — $1450.00/337.00
0S-9 Lvl 11 — $995.00/200.00
Unix — up to S2S35/675 — Call for Info?
IBM PC a compats — $635.00/170.00
■iitcOf Tevr Cmimt
by Dale Fucxett — An excellent Book on using 01-9. Oriented
tomrds using tne po»erf«l aisicOf Prugi sarniea le«««sge. tt also
contains 4 lot of good Inform! tlon on sslae "/S^g in general.
normally $16.95
Special SOU only $16.00
-^■EEl
Arid 31 D,1.a.
[Add >s Imtfmee ImmsisB
101 AM rer.1i.
*Flf X *s a trademark of Tecrwcal Systems Consultants
~OS9 is a trademark of MiCroware
111 PlOU
'68' Micro Journal
TSC "Flex Utilities'
ISC 'Sort Util-
ise "6809 Basic'
ISC 'Extended- Basic -
ISC 'aeBug'
ISC VIEX Diagnostics
ISC Mext Processing System
ISC "68000 Cross Assembler"
iilf IftitlA
F 00 Cftftftsn(,ia Smilh Rd
* Hin»o* TN 373*3
•Of0 Ifl 15) &d? 4601
CoCo o«v ♦
SOrTUIAAE
Specify Tcnar Optraflnq SfsUm I DIs* Size
July 85
aa Sefcemre
«1S S75.O0,
•OW only
$65.00
«1S $75.00.
•DM only
Sfe.00
«1S $75.00.
•DM only
$«S.OO
WIS $100.00.
MM only
$90.00
»4S $75.00.
•DM only
$«§.S0
was $75.00,
•OV only
J4S.00
■- was $75.00.
MM only
S6S.00
was $350.00.
•DM only
Sltt.H
AMLLaftillty laxaanda
F - TLEXt CCF * Colo
r Cowpuier
FLEX
- OS-9, 000 - Colo
r Computer
OS-9
U - UntFUX
CO) ■ Color Computer
Disk
OCT » Color Computer Tape
Iff
31
(615)842-
%
%'
TILKX SSB 414 PVT 1TH
2-4600 £&
fcttt mf A§?
5900 Cassandra Smith Rd.
Hixson. TN 37343
for Information
caM (615) 842-4601
CoCo 05-9'" FLEX'*
SflFTUIARE
[flSSEmBLEHS|
ASTRUX09 from Southeast media -- A "Structured Assembler for the
6809" which requfres the TSC Macro Assmrfrter, F, CCF - 599.95
Macro A stealer for TSC — The FLEX STA1OAR0 Assembler.
Special — CCF 535.00:
F 550.00
OS* Extended 6809 Macro Assembler fro* L1oj4 i/o. — Provides local
labels. Motorola S-records, and Intel Hex records; XREF, Gene-
rate OS-9 Memory nodules under FLEX. FLEX, CCF, OS-9 599.00
Relocating AssewAler w/Unklne. Lcmder trow TSC. -- Use with many of
the C and Pascal Compilers. F.CCF 5150.00
KACE, by Graham Trott Irom kffndmsh Micro System* — Co-Resident
Editor and Assembler; fast Interactive A.L. Programming for small
to medium-sized Programs. F.CCF - 593.00
TRUE CROSS ASSEMBLERS froc Commuter Systems Coasmltentt —
Supports 1802/5, Z-80, 6800/1/2/3/8/H/HClI, 6804, 6805/HCOS/
14680S. 6809/00/01, 6502 family, 8080/5, 8O20/1/2/35/C35/39/
40/48/C48/49/C49/S0/8748/49. 8031/51/8751, and 68000 Systems.
Assembler and Listing formats same as target CPU's format.
Produces sac nine Independent Motorola S-Te/t.
FLEX, CCF, OS-9. UMFLCX each - J 50. 00
any 3 - 1100.00
the complete set ■/ C Source [ except the ttOOO Source) - S 200. 00
IAS* Cross Assemblers for FLEX from CmmpilMate Ltd. — This set of
6800/1/2/3/5/8. 6301, 6502, 8080/5. and Z80 Cross Assemblers
uses the familiar TSC Hacro Atsambler Command Line and Soruce
Code format. Assembler options, etc.. In providing code for the
target CPU's. Complete set, FLEX only - 51 SO. 00
CftASJll from lloyd I/O — 8*81 1 Hacro Cross Assembler with same
features as OSM; cross-assemble to 6800/1/2/3/4/5/8/9/11, 6502,
1802, 8048 Sers, 80/85, Z-8, Z-80, 7NS-7000 sirs. Supports the
target chip's standard mnemonics and addressing modes.
FLEX, CCF, OS-9 FuTl package - 5399.00
CtASml 16. *2 from Lloy4 1/0 -
Cross Assembler far the
FLEX. CCF,
OS-9 5249.00
DISRSSEkTlBLERS
SUPER SLEUTH from Computer System* Consultants — Interactive
Disassembler; extremely PONERFULI Disk File Blnary/ASCCC
Examine/Change, Absolute or FULL Disassembly. XR£F Generator.
Label "Name Changer", and Files of "Standard Label Names" for
different Operating Systems
Color Computer
CCO <32K Req'd) Obj. Only 549.00
CCF, Obi. Only 550.00
CCF, w/Source 599.00
CCO, Obj. Only 550.00.
SS-50 Mis (all «/ A.L. Semrc*}
F, 599.00
IT, 5100.00
0, 5101.00
OTKAMITE ♦ from Computer Systems Center -- Excellent standard
"Batch Node" Disassembler. Includes XREF Generator and
"Standard Label* Files. Special OS-9 options w/ OS-9 Version.
CCF, Obj. Only 5100.00 CCO, Ob J. Only 5 59.95
F. " " 5100.00 0, " * 5150.00
U. " " 5300.00
PROGRflmminG|LHnGURGES
rL/9 froa ttts4rwsb Micro 97* terns — By Craham Trott. A combination
£dLtor/Compller/Debugger , Direct source-io^-objecc compilation
delivering fast, compact, r«-entr*nt . ROM-able, PlC. 8 a 16-blt
Integers 6 6-dlgU Heal numbers for all real-world probleea.
Direct control over ALL System resources, Lncludlng Interrupts.
Comprehensive library support; simple Machine Code interlace;
atep-by-atcp tracer for laatsnt debugging. 300a page Kanual
with tutorial guide. P, CCF - S19I.0O
V
KHIMSJCAL from Whimsical Oevmlopsients ~ Now supports Real theaters,
"Structured Programming" WITHOUT losing the Speed and Control of
Assembly Languagel Single-pass Compiler features unified, user-
defined 1/0; produces RONable Code; Procedures and Modules
(Including pre-complled Modules); many "Types" up to 32 bit
Integers. 6-dlglt Real Numters, unlimited sized Arrays (vectors
only); Interrupt handling; long Variable Names; variable
Initialization; Include directive; Conditional compiling; direct
Code Insertion; control of the Stack Pointer; etc. Run-Tine
subroutines Inserted as called during compilation. Normally
produces 10* less code than PL/9. F and CCF - 5195.00
C Compiler from Mfndrush Micro ^Tftems by James NcCosh. Full C for
FLEX except bit- fields. Including an Assembler. Requires the TSC
Relocating Assembler If user desires to Implement his own
Libraries, F and CCF - 5295.00
C Compiler from Intro! — Full C except Doubles and Bit Ffelds,
streamlined for the 6809. Reliable Compiler; FAST, efficient
Code. More UNIX Compatible than most.
F, CCF. and - 5375.00 U - 5425.00
PASCAL Compiler from Lucldtte — )S0 Based P-Code Compiler.
Designed especially for Microcomputer Systems. Allows linkage to
Assestoler Code for maximum flexibility.
F and CCF T * 5190.00 F 8T - 5205.00
PASCAL Compiler from OmejaSort — For the PROF ESSIWUU.; ISO Based.
Native Code Compiler. Primarily for Real-Time and Process
Control applications. Pomerful; Flexible, Requires a "Motorola
Compatible" Relocating Asmb. and Linking Loader,
F and CCF - 1425,00 One Year Malnt. «■ 5100.00
-•ASIC from LLOYD I/O -- A "Native Code" BASIC Compiler which Is
now Felly TSC XtASIC compatible. The compiler compiles to
Assembly Language Source Code. A NEK, stress! jmed. Assembler Is
now Included allowing the assembly of LARGE Compiled K-BASJC
Programs. Conditional assembly reduces Run- time package.
FLEX. CCF. OS-9 Compiler wit* Assembler - 5199.00
ens
Arid 21 U.S.A.
(•Is. 12. SO)
Arid 51 Surfact FeT*l|n
tOt AIt K- r* if (I
CRUfCH COBOL from Coapusense Ltd. — Supports large subset of ANSIJ
Level J COBOL with many of the useful Level 2 features. Full
FLEX File Structures. Including Random Files and the ability to
process Keyed Files, Segment and link large programs at
runtime, or Implemented as a set of overlays. The System
requires S6K and CAN be run wfth a single Disk System.
FLEX, CCF; Normally 5199.00
Special Istrodoctery PHce (while In effect} — 599.95
FORTH from Stearns Electronics — A CoCo FORTH Programming
Language. Talloteo* to tile CmCol Supplied on Tape, transferable
to disk. Nrltten In FAST ML. Many CoCo functions (Graphics,
Sound, etc.). Includes an Editor, Trace, etc. Provides CPU
Carry Flag accessibility, Fast Task Multiplexing, Clean Interrupt
Handling, etc. for the "Pro". Excellent "Learning" tool!
Color Computer OILY - SS8.95
"FLEX *s a itatimmark ot Technical Systems Consultants
*OS9 is a trademark ol M»cro*are
111 Pleaasa Specify
Ctmmre/tlng System
*m liability
r - flex, ccr
O » 06-9, oro
U • UhlFLEX
CO) - Color Convputer Disk
CCT - Colot Compter Tape
l til
Co tor Compter FLEX
Cotor Compute r OS-9
32
July '85
'68* Micro Journal
5DFTWHHE|DEVELDPmEnT^ ]
Bas1c09 XRef from Southeast media — Thfs BeslcOf Cross Heferente
Utility Is a Bas1c09 Program which will produce a "pretty
printed" If sting with each line numbered, followed by a complete
cross referenced listing of all variables, external procedures,
and line numbers called. Also Includes a Propria List Utility
which outputs a fast "pretty printed" listing with line numbers.
Requires B*s1c09 or RunB.
* CCO obj. only — S39.M; w/ Source - J7f .fS
Lacldata PASCAL UTILITIES (Requires LUCIDATA Pascal ver 3)
XftEF — produce a Cross Reference listing of any text; oriented to
Pascal Source. F and CCF - S2S.00
INCLUDE -- Include other Files In a Source Text, including Binary;
unlimited nesting capabilities. F and CCF - S25.O0
PROFILER — provides an Indented, Numbered, "Structograia" of a
Pascal Source Text File; view the overall structure of large
programs, program Integrity, etc. Supplied In Pascal Source
Code; requires compilation, F and CCF - S25.00
DU6 from Southeast Media -- A UafFLEI "basic" Oe-ComplTer. Re-
create a Source Listing from UnlFUX Compiled basic Programs.
Works w/ ALL versions of 6809 UnlFLEX basic, U - S219.9S
FULL SCREE* FOfttS DISPLAY from Computer *st*» Consultants — TSC
Extended BASIC program supports any Serial Terminal with Cursor
Control or Memory-Mapped Video Displays; substantially extends
the capabilities of the Program Designer by providing a table-
driven method of describing and using Full Screen Displays.
F and CCF - SSO.00. U - S7S.00
DISK^UTILITIESJ
OS-9 Vtttk from Southeast Media — For Level I only. Use the
Extended Memory capability of your SWTPC or Glmlx CPU card (or
similar format OAT) for FAST Program Compiles, CMO execution,
high speed Inter-process communications {without pipe buffers),
etc. - SAVE that System Memory. Virtual Disk sUe Is variable 1n
4K Increments up to 960K. Some Assembly Required.
— Lewi I OILY — OS-9 ob J, only - J79.9S; w/ Source - S149.95
*
0-F from Southeast Media -- Written In 6ASIC09 (vita Source).
Includes: REFORMAT, a 6ASIC09 Program that reformats a chosen
amount of an 0$-9 disk to FLEX Format so It can be used normally
by FLZX; and FLEI, a BASIC09 Program that does the actual reed
or write function to the special O-F Transfer Olsk; user-friendly
menu driven. Read the FLEX Directory. Delete FLEX Files. Copy
both directions, etc. FLEX users use the special disk just like
any other FLEX disk. - S79.95
COPYMULT from Seatheast Media — Copy LAKE Disks to several
smaller disks. FLEX utilities alio* the backup of AMY slae disk
to any SMALLER size diskettes (Hard Disk to floppies. 6" to $",
etc.) by simply Inserting diskettes as requested by COMMNLT.
wo fooHng with directory deletions, etc. COPYNULT.CMO
understands normal "copy" syntax and keeps up with files copied
by maintaining directories for both host and receiving disk
system. Also Includes ftACKIP.CPS to download any size "random"
type fHe; RESTORE. CN9 to restructure copied 'random" files for
copying, or recopylng back to the host system; and FtEELIK.Ctt)
as a "bonus" utility that "relinks" the free chain of floppy or
hard disk, eliminating fragmentation.
Completely documented AsseweYly U"9uafe Scarce files Included.
ALL 4 Programs (FLEX, a - or S") S9I.S0
COPYCAT from Lucldata — Pascal MOT required. Allows reeding TSC
Mfnl-FLEX. SSB 00S68. and Digital Research CP/H Disks while
operating under FLEX 1.0, FLEX 2.0, or FLEX 9.0 «1tH 6300 or
6809 Systems. COPYCAT will not perform miracles, but. between
the program and the manual, you stand a good chance of
accomplishing a transfer. ATso Includes some Utilities to help
out. Programs supplied in Jtodelar Sovrce Code (Assembly
Language) to help solve unusual problems.
F and CCF S* «■ SSO.00 F 8" - S65.00
** HirtiE •• >
Ada it n.s.A.
Uin. 12.50)
A4S 11 SwtfflC* MMlt*
Ibt Ait r*r«i|»
•FLEX is a trademark o* Technical S/slems Consuilanls
"0S9 is a irademarfc ol Mrcrowere
^jf TELEX SSt did fVT 1TH
(615)842-4600
%
w
2-4600 M
%%lk 'avAif
5900 Cassandra Smith Rd.
Hixson, IN 37343
for information
call (615) 642-4601
CoCo OS-9 T,t FLIX'"
SOFTWARE
FLEI DISK UTILITIES from Campeter interns Cental tant* ~ Eight (a)
different Assembly Language W Source Code) FLEX Utilities for
every FLEX Users Toolbox: Copy a File with C*C Errors; Test Disk
for errors; compare Uo Disks; a fast Olsk Bacftep Program Edit
01st Sectors: Linearize Fr«e-Cna1m on the Olsk; prfnt Olsk
Identification; and Sort and Replace the Disk Directory (In
sorted order}. -- PLUS -- Ten XBASIC Programs including: A
BASIC fteseqmiecer with EXTRAS over "RENUM" like check for itfsslng
label definitions, processes Disk to Dfsk Instead of In Memory,
etc. Other programs Compare, Merfe, or Generate Updates
between two BASIC Programs, check BASIC Seqeeece Bombers,
compare t*e ■nsee.eemce* files, and S Programs for establishing a
Hatter Ofrectory of several Disks, and sorting, selecting,
updating, and printing paginated listings of these files. A
BASIC Cross-Reference Program, written In Assembly Language,
which provides an X-Ref Listing of the Variables and Reserved
Words In TSC BASIC, XBASIC, and ftfCOPFRLt BASIC Programs.
ALL Utilities fmcludm Semrce (either BASIC or A.L. Source Code).
F and CCF - SSO.OQ
icommunicBTionsil
CMODEN Telecommunication! Program from Conneter Systems
Consultants, imc. -- Menu-Driven; supports Dumb- Terminal Mode,
Upload and Download in non-protocol mode, and the CP/M "rtode»7*
Chris tensen protocol mode to enable communication capabilities
for almost any requirement. Written In 'C'.
FLEX. CCF. OS-9, UnlFLEX; with complete Source - $100.00
without Source - (50.00
KOATA from Southeast Media -- A COftXURTCATION Package for the
UmlFLEI Operating System. Use with CP/M. Main Frames, other
UnlFLEX Systems, etc. Verifies Transmission using checksum or
CRC; Re-Transmits bad blocks, etc. t) - S2fl.fl
wim\
RAPIER - 6609 Chess Program from Seetneest Media — Requires FLEX
and Displays on Any Type Terminal. Features: Four levels of
play. Swap side. Point scoring system. Two display boards.
Change skill level. Solve Checkmate problems 1n 1-2-3-4 moves.
Make move and swap sides. Play white or black. This 1s one of
the strongest CHESS programs running on any microcomputer,
estimated USCF Rating 1600* (better than most 'club* players at
higher levels). F and CCF - S7f.9S
ttft A** v Mint
-mw^^W n0 Cassandra Smilh ftd CdC * °»*" «** "
68* Micro Journal
III Please Specify Your OfcMratlng System & Disk
July 85
SI j
*mLUbllJty Uteres —
P - FLEKt CCF • Col^r Computer FLEX
O ^ OS-9, CTO * Ctilnf Compute? OF-9
U - UhlFLFX
Cd> - Color Computer Disk
OCT • Color CofnfXite* Tape
III
33
TELEX 551 did »VT ITH
(6
15)842-4600 A
M
^r $»§ia
5900 Cassandra Smith Rd.
Hixaon. TN 37343
tor information
calk <S15) $42-4e0i
COCO OS-9 T * FLIX"
SOFTWARE
{ WDRD|PHDCESSinG
SPELLB "Computer Dictionary' from Southeast NedU — 99TB 120,000
mordsl Look mp a weed from wfthln your Editor or Word Processor
(with the SPH.CJIO Utility which operates in the FLEX UCS). Or
check and update the Text after entry; ADO WORDS to the
Dictionary, "Flag" questionable words In tie Tent. "view a word
In context" before changing or Ignoring, etc, SPELLB first
checks a 'Common Nord Dictionary", then the normal Dictionary,
then a 'Personal Word List", and finally, any "Special Word List"
you may have specified. STCILB also allows the use of Small Mst
Storage systems,
F and CCF - $t29.9S
iJTh
X0NS from WestcMster Applied Beslmtss <em* — Powerful DBMS;
M.L. program will work on a single tided S" disa, yet is F-A-S-T.
Supports Relational, Sequential, Hierarchical, and Random Access
F11e Structures; has Virtual Memory capabilities for fleet Data
Bases. XOPtt Level I provides an "entry level" System for denning
a Data Base, entering and changing the Data, and producing
Reports. XOHS Level II adds the POWERFUL "BEttRATT facility
with an English Language Coemend Structure for manipulating the
Data to create new File Structures, Sort, Select, Calculate,
etc. XOMS Level IK adds special "Utilities' which provide
additional ease In setting up a Data Base, such as copying old
data Into new OaU Structures, changing System Parameters, etc.
X0*S System Manual - $?4.95 IMS Lvl I - F a CCF - IL29.9S
XtKS Lvl II - F 4 CCF - $199.95
XOMS Lvl III - F ft CCF - SK9.95
iXCOUNTMC PACKAGES — Greet PlalM Compete r Co. and Universal Data
Research, Iik. both have Date Base and Business Packages written
in TSC XSAS1C for REX, CoCo FLEX, and URlFLEX.
Call 800-UHtaOO for more Information
SCRCDITOA IK from tflndrms* Micro Systems — Powerful Screen-
Oriented Editor/Word Processor. Almost SO different commands;
over 300 pages of Documentation with Tutorial. Features Mu1t1~
Coluen display and editing, "decimal align" columns (AMD add them
up automatically), multiple keystroke macros, even/odd page
headers and footers, Imbedded printer control codes, all
Justifications, "help" support, store common command series on
disk, etc. Use supplied "set-ups", or remap the keyboard to
your needs. Except for proportional printing, tMs package will
DO IT ALL!
600Q or 6009 FLEX or SSB DOS. OS-9 - H75.O0
■TTLO-CtArl froa Cre ac Plmlea Coapntmr Cm. -- A fuU-acreen
orlantBd WORD PlOCfcSSOl — (uaci the *l x 24 Olaplay Screens on
CoCo FLUX/ STAR- DOS. or P1J Wotdpak). Full screen dleplay and
•dltlni; mpporiB the belay Wh««1 proportional printer*.
m* niaj — > ccf and ceo - $99,9>. p or o - $170,95 . u - 92+9.95
■TTLO-IPILL from Great PUlma Compmter Cm. — P«at Computer
Dictionary. Complements Siylogriph.
mW Pima > CCF and CCO - 5*9.95, P or - 599,95. U - yJUi
ITTUKOKI fton Qwmmt Umlmm C » v l«r Co. — Mer&e Kalllng Liat to
"Pari" Latttre, Print multiple Ftlea, etc., through Stylo.
HV PBiat > CCF and CCO - $59.95, P or - 5 79 . 95 . U - £ 139.95
miSCELLHOEOUSl
•ma-rax
Cr.ph ♦ SdvII ♦ hmrgm Pmckaga OwaUU
F or - $329.95. U
« 549. 95
JUST from Southeast Media — Text Formatter developed by Ron
Anderson; for Dot Matrix Printers, provides many unique features.
Output "Formatted" Text to the Display. Use the FPP.IIT.CPe
supplied for producing multiple copies of the "Formatted" Text on
the Printer INCLUDING MBEDOED PRIKTER COMMANDS (very useful at
other times also, and worth the price of the program by Itself).
"User Comflfmreble" for adapting to other Printers (coses set up
for Epson NX-BO with traftrax); up to ten (10) imbedded "Printer
Control Commands". Compensates for a "Oouble Width" printed
line. Includes the normal line width, margin. Indent, paragraph,
space, vertical skip lines, page length, page numbering,
centering, fill. Justification, etc. Use with ART Editor.
Supplied with "Structured Source" (wlndrush PL/9); easy to see
the flow of the program.
F and CCF - 149. 9$
TABULA RASA SPREADSHEET from Computer Systems Consultants --
TABULA RASA Is similar to OESXTOP/PLAN; provides use of tabular
computation schemes used for analysis of business, sales, and
economic conditions. Henu-drlven; extensive report-generation
capabilities. Requires TCC'i Extended BASIC.
F and CCF - $100.00, U - $200.00
OTHAXALC from Computer Systems Cotter — Electronic Spread Sheet
for the 6009.
F and SPECIAL CCF - $200.00, U - 1395,00
FULL SCREER imBTuW?/mjp from Computer Systems Comseltaats — Use
the Full Screen Inventory Sytten/Materlils Requirement Planning
for Maintaining Inventories. Keeps Item field file In
alphabetical order for easier Inquiry. Locate and/or print
records matching partial or complete Item, description, vendor,
or attributes; find backorder or below stock levels. Print-outs
In Item or vendor order. MRP capability for the maintenance and
analysis or Hierarchical assemblies of Items in the Inventory
file. Requires TSC's Extended BASIC.
F and CCF - 1100. 00, U - $150.00
FULL SCRCER MA1L1IC LIST from Compiler Systems CemtmlUita -- The
Full Screen Mailing List System provides a means of maintaining
simple mailing lists. Locate all records matching on partial or
complete name, city, state, tip, or attributes for Listings or
Labels, etc. Requires TSC*s Cxtemmvd BASIC.
F and CCF - $100.00. U - $110.00
OIET-TRAC Forecaster from Southeast Media — An XBASIC program
that plans a diet In terms of either calories and percentage of
carbohydrates, proteins and fats (C P 61) or grams of
Carbohydrate. Protein and Fat food exchanges of each of the six
basic food groups (vegetable, bread, meat, skim milk, fruit and
fatl for a specific Individual. Sex. Age, Height, Present Weight,
Frame Size. Activity Level and Basal metabolic Rate for normal
Individual are taken Into account. Ideal weight and sustaining
calories for any weight of the above Individual are calculated.
Provides number of days and dally calendar after weight goal and
calorie plan Is determined.
F - $09.05, U - M9.95
Add 21 O.S.A.
(•IB, SJ.iO)
Add }I SwrUc* tcttita\
102 Or r«i*1f«
*FLEx »s a lraoe*"irfc ol Technical Systems Constiiiams
"OS9 is a ifademarfc cH AAcro*are
lit PI ©as*
^Bw^k^J'oo c,9t»«nrii4 $n»lh Rd
ftatf HiftiA
CaCto 414-V* tlCtf '
SOFTWARE
into («ISJ 64? «601
AAMLLaMilty Lmqmnto
f * PLEK, (XT « COlor 0»«pjter FLEX
O - 08-9, CCO - Color Compute/ OS-9
U - \*ilFL£X
OCX) * Color Conputer Disk
CCT ■ Color Computer Tape
34
Specify Yoiar C^msretfng Syxtw I Dlafc Slxa II T
July '85
'68' Micro Journal
PRINT "At: "; Id.bHIO); ":0"; td,b(SIE); ":00"
ELSE
PRINT "At: '; Id.b(ilO); V; 1d.b|SIE>; "rOtT
EMOIF
1:-1d.b[JOB)»2S6*1d.b(J0C)
PRINT USING 'S^K.SZVOvner [0; ",1." ";
1:-1d.b(S0E)»256*1d.b(S0F)
PRINT USING *S9.[6VDUk [0: '.1
t«ap:-id.b{St)0>«6SS36.*ld.b(Wl>*256*1d.b($02)
PRINT USING •S9 i [6'.'Sector$: ".temp;
PRINT USING "SIZ.I3-/ Tracks: \1d.b(J03)
te*p:-256M1d.bU06W56*i<l.b{J07>>
1snl:-teap
PRINT USING -SI4. 1 5* , "Bytes/Sector: \ t*«p
PRINT "Attributes: *;
J:«fd.b(SOD>
FOR 1-7 TO STEP -1
IF LAND(J.2**n<>0 THEN
PRINT * '; attr(1);
ENOIF
NEXT 1
PRINT
PRINT "Fomat: ";
IF LANDMd.b(lIO).I)«0 THEN
PRINT *SS ";
ELSE
PRINT "DS ";
END IF
IF LAND(1d.b(U0>.2)»0 THEN
PRINT "SO ";
ELSE
PRINT "00 ";
ENOIF
IF UN0(1d.b(S10).4)«O THEN
PRINT "48 TPI h ;
ELSE
PRINT "96 TPI *;
EHOIF
PRINT
1:-1d.b(US>
j:-1d.b(S16)
k:-1d.b(S17)
IF 1*0 AND J-0 AND k-D THEN
PRINT "Otsk is not bootable"
ELSE
PRINT *Dfsk is bootable*
END1F
(• DETERMINE NUMBER OF FREE SECTORS
-)
count: the ntfrter of bytes read
Mpstze: the size of the sector map
scount: nuabcr of free sectors counted
Isnl: location of LSN 1
This area reads the nunber of bits that
are turned off In the bytes In the
■taP area.
count:-0
naps1ze:-{d.b(S04]«256«1d,b(S05]
scount :*0
OPEN #path ( drf«e:R£AO
SEEK #path,1snl
WHILE countuwpsUe DO
GET #path.*ap
count: -count* 1
FOR 1«0 TO 7
IF LAND(aap.2**t)-0 THEN
scount >scount*l
ENOIF
NEXT 1
ENOMHILE
CLOSE #path
PRINT USING "SlS.IBVAvanable Sectors:
END
CoCo User Notes
MODEM COMMUNICATIONS, Part One;
or,
A Modem in Every Port
by Carl Mann
It almost makes sense, sometimes.
After all, a computer can transmit
information faster than all but the most
nimble of us can think it - and with
(allegedly) fewer errors in the process.
So why not use an inexpensive, powerful
micro (like CoCo, just for example) as a
means of transferring lots of information
between distant points over, say something
common and easy to use - like telephone
lines? So the reasoning goes - and thus
were the various hobbles that comprise
modem communications born.
Just for the sake of our new readers,
(welcome, friends!) let's back up a wee bit
at this point. Us old-timers might tend to
take the fundamentals for granted
sometimes, so let's have a little
background for starters, OK? If you will,
Maestro. . .
(At this point, the lights dim. An
eerie blue high-tech glow is as much felt
as seen, and the emcee's voice takes on a
compelling quality of resonance thanks to
studio enhancement.)
MODEM: As with many elements of the
primitive pseudo-language known to many as
"Compubabble", this word is an acronym.
(The actual equipment referred to may well
be an anachronism, depending on its age
and the market for which it was designed.)
It stands for "MOdulator/DEModulator". The
reference to modulation (and its undoing)
in turn refers to the way in which the
device works. A modem, like most 1f black
boxes", has in "in" end and an "out" end.
Such a device accepts digital information
at its input and superimposes it onto a
special tone signal on its output. The
tone (with data superimposed) may then be
transmitted over much greater distances
than the raw data alone could ever be.
The tone is called the "carrier 1 ', because
it "carries" the data. The data is just
called "data".
Modems are generally designed to
operate at a specific rate of data
transfer. This transfer rate is called the
"BAUD" rate. Don't bother to look it up in
the RS Microcomputer Dictionary. (It's a
very good book for technical detail, but
pretty short on background and history.)
Webster's Collegiate defines it well. The
"BAUD" rate is named after the French
inventor Baudot, who presumably pioneered
some early form of electromechanical or
electrical communication about the early
part of the century. A data transfer rate
of one BAUD is equal to transmitting
information at the rate of one electrical
vibration, or "bit", per second.
One bit per second is far too slow to
be useful. The minimum rate for CoCo
communications is generally 300 BAUD.
Let's see... that's one "start" bit, eight
data bits, and a "stop" bit. Ten bits in
all, and only one character (the letter "A",
'68' Micro Journal
July "85
35
say) transmitted. Call an average word
five letters long, and you've got roughly 60
words per second flying down Ma Bell's
Pipeline to the Stars. That's much faster
than anybody I know can read - or type, for
that matter.
Modems come In all sizes and price
ranges, depending on the design, features,
and time of year. Fifty bucks Is more or
less the low end, and several hundred the
high. The cheap ones require that you do
everything - dialing, mode selection,
etcetera - all by hand. But they are easy
to learn to use, and generally effective.
(The Shack sells its 28-1175 Modem IB for
as little as $40.00 sometimes.) More
expensive units will dial the "phone
(Including Sprint or other discount long-
distance service) codes, listen for a
pickup at the other end, and keep on
hanging up and trying again until something
(or someONE, which Is a definite hazard)
picks up the "phone at the other end.
Top-of-t he-line modems will handle multiple
BAUD rates, do everything else 1 mentioned
before, PLUS transmit any number of pre-
programmable messages designed to enable
you to reach into the cookie jar at the
other end, grab what you want, and get out
with a minimum of wasted "connect-time".
(That, of course, is what Ma Bell duns you
for whenever you make any long-distance
call - modem or not.) Some public access
information services (commonly called
"BBSs", for Bulletin Board Service(s)) and
all commercial information services slap an
additional charge of five to forty or more
dollars per hour onto the cost of hooking
up. On the other hand, many privately-
owned and club BBSs allow at least limited
access without charge. ("Goodies - really
useful information or programs) may cost
extra. Shop around. Many computer clubs
offer lists of active BBSs from their own
BBS databases. ("Database" is compubabble
for "a pile of Information organized in some
semblance of order".)
The modem Is the "hardware" (that Is,
the copper, fiberglass, epoxy, and silicon)
of the job. The computer program
("software", the babble goes...) which
enables all this wondrous action to happen
before your eyes Is another story. May I
make a suggestion? Get the least expensive
modem that will get you on line - and the
best, most sophisticated terminal package
available. You do NOT need a disk system
to have a working communications package.
I have seen an Intelligent modem make a
monkey out of three grown men for the
better part of two weeks. But excellent
software is a definite must. Look for such
things as:
1: A wide range of available baud rates
- especially on the high end. Nobody uses
110 baud anymore, but 2400 baud is becoming
Increasingly popular. It's easier to
relearn how to use a new modem than it Is
to relearn a new communications software
package.
2: The ability to control what
information is actually saved for later use,
as opposed to what is simply scrolled past
your eyes and off the video screen back
into the Great Void. This ability should
Include two aspects: local and remote
control. Remote control allows the host
computer to tell your CoCo, "WAKE UP AND
LISTEN!" before It sends a free program, a
pretty picture, or the irreplaceable
contents of your Electronic Mailbox Account
across the Gulf of Time and Space.
3: Control over EVERY aspect of the
"communications protocol". This Includes
the number of start, stop, data, and parity
bits used to communicate and test the data
for errors. Having this capability enables
you to communicate with everything from
Commodore VIC-20s all the way up through
the mega-computers that run our country's
libraries and schools. Not to mention the
odd minicomputer that might be encountered
on the way to the grocery store. (You,
not the mini, I presume...)
4: Last, but not least: a menu-oriented
display of the above communication
parameters that allows YOU, the OPERATOR,
to SEE what the actual values ACTUALLY ARE
at any point in time BEFORE making any
adjustments (as may happen In mid-session).
There's nothing worse than needing to
adjust, say, the "word length" (that's
actually "bits per character", friends) in
midstream, but not remembering what It
presently Is in the heat of the moment -
and not being able to find out unless one
passes it by with the <ENTER> key first.
The only way to deal with such a program Is
to remember the necessary information, then
re-enter the menu and make the necessary
changes on the second pass. Not nice.
Insist on visible parameters when you go
shopping.
Once all the appropriate hardware and
software are assembled and running it's
36
July 85
68* Micro Journal
just a matter of connect-time and
practice. Once you learn where all the
buttons are and when to push them, CoCo-
as-communicator may become as much a part
of the family as anyone else.
The nice thing about such a
microcomputer as CoCo is that it is a
"literally anything" machine. Today CoCo
processes words. Tonight CoCo picks up
satellite weather pictures. Tomorrow it's
in control of a monster mainframe computer
halfway across the continent. The next
day, it's back to remembering recipes and
"phone numbers. Where else can you go to
tell a box full of plastic and silicon, "YOU
ARE A (insert function here)" and expect
instant obedience? Not bad for a lousy two
hundred bucks or so.
Until next time • • .
The DRAGON Engine
UNIX-LIKE TOOLS ON
SINGLE USER/ SINGLE TASK COMPUTERS
By
Tom Gilchrist
Brad Taylor
You may not have enough money to have a
computer running UNIX(*), but you can have
some of the power of UNIX running on your
personal computer. Some of the features of
UNIX tools can be simulated in a single-
user, single-task environment. A set of
functions have been assembled which will
help you put together UNIX-like tools. We
call these functions the "Dragon" engine.
Two UNIX-like tools are presented which use
these functions and will serve as examples
of how other tools can be written.
The example programs are written in
INTROL-C for the FLEX(*) operating system.
FLEX is for the 6809 processor and is used
in a number of general purpose computers
like the Radio Shack Color computer and
computers by Smoke Signal, just to name two
manufacturers. The techniques used can be
adapted to operating systems like MS/DOS or
CP/M.
THE UNIX SHELL
The "shell" in a UNIX system can be
thought of as a powerful "command line
processor". In other words, when you type
in a command, the shell interprets the
command and executes the desired action.
The shell is a program that always runs
when you are in the command mode of UNIX.
A good example of some of the features
of the UNIX shell can be illustrated by
some examples. There is a command, or
"tool" in UNIX terminology, called "Is".
The function of this tool is to list the
contents of a directory in much the same
way as the "dir" or "cat" command found, in
many disk operating systems, list the files
on a disk. As a default, the "Is" tool
lists all the files in your current working
directory in alphabetical order. This is a
welcome feature when you are looking
through a long listing of disk files.
Another feature of the shell is it's
ability to do "wild card" searches on file
names. With this feature you can display
files that contain certain desired
character patterns in their names. The two
more common matching symbols are the "?"
and the "*" . When the "?" is used in a
pattern mask, it is used to match any
single character. The "*" tells the shell
to match anything. There is a third basic
mask construct which is "[x-y]" which
matches a single character in the range of
x to y . A few examples will demonstrate
this feature.
Is test*
Is hello7.txt
Is [a-g]ver.c
The first example will match any file name
starting with the string "test" or the word
"test" by its self. The second example will
list all the files which have 6 characters
and start with "hello" and contain any one
character before the ".txt" extension.
"helloa.txt" would be found with this mask,
but "hello.txt" and "helloer.txt" would not.
The third example will match any file that
starts with any one of the characters a
through g followed by "ver.c". The file
"bver.c" would be listed but "wver.c" would
68' Micro Journal
July 85
37
not. By combining these three basic masks
you can construct very useful and powerful
masks.
COMMAND LINE ARGUMENTS
There is another powerful feature of the
UNIX shell which deals with passing
arguments to a tool or program. Let's
consider the UNIX tool called "grep". This
tool will search a file for the occurrence
of a given set of characters. If we were
looking for the word "print" in the file
"text.txt", we would type the following
command line.
grep print text.txt
Many operating systems have the tool
"find" that will do this task. However, UNIX
gives us the power to use a wild card mask
in the file name to tell the tool to search
through any number of files.
grep print *.txt
In this example the system would find all
the occurrences of the string "print" in any
file that has the extension of ".txt" and
report them. The UNIX tool "grep" will not
only list the files in which it found the
match, but will also list them in
alphabetical order.
If you think about this last example,
there are at least three ways an operating
system could handle this task. Let's say
there are three files in the directory that
will match the mask "*.txt". The names of
these three files are "a. txt", "ab.txt", and
"abc.txt".
One method might be to have the shell
run the tool "grep" three times. Each time
the shell would call the tool with the
correct file name inserted in place of the
mask. While this sounds reasonable at
first, it is really not a good idea for a
number of reasons. For instance, it would
be very difficult to have the tool give the
total number of instances the string was
found in all three files as a statistic at
the end of the listing.
A second method would have the shell
pass the program the list of file names
which matched the mask. It would be like
typing in the following line.
grep print a. txt ab.txt abc.txt
It would then be up to the program to open
each file, processes it, then close it, one
at a time. This is basically the way the
UNIX shell works.
A third way would be to pass the command
line to the tool and let it do all the work
of finding the file names which match the
mask. The tool would also have to
alphabetize the list and process each file
as in the second example. If you don't
have a shell like UNIX on your computer, the
Dragon engine, using this method, will
accomplish the task.
THE GENERAL DRAGON ENGINE
Whether you are writing tools under UNIX
or a small DOS on a personal computer, you
will need to design some sort of "engine" to
process command line arguments. The
"Dragon" engine is designed to do some of
the tasks done by the UNIX shell. Writing
tools in 'C allows the code and technique
to be very portable between different
operating systems.
The general case for the engine should be
designed to deal with command line options
(or dash options) as well as file names.
While the Dragon engine does not have all
the features you might need for all tools,
it is sufficient for most tasks. Each
program uses the file "dragon. c" for support
routines. Below is a structured english
representation of the first level of the
Dragon engine.
Get command line arguments.
Check for dash options and set flags.
Get the Mask (if applicable).
Open the disk directory.
Read A Directory Entry.
Process the file name against the
mask.
Store matching file names in
alphabetical order.
Close Directory.
Get each file name in order stored.
Pass Each file name to the
"action" section of the tool.
Exit the tool (back to DOS).
The listings of two tools using the
Dragon engine start on page XXXX. The first
listing is for a tool called "grep". The
"grep" tool will search for given character
strings within text files. The second tool
is called "is". As described earlier, the
"Is" tool gives a listing of files in a
directory.
36
July '85
'68* Micro Journal
These two tools are portable to other
operating systems except for the Dragon
engine support routines In "dragon. c". The
only major changes In "dragon. c" are the
routines called "diropenQ", "dirreadO", and
"dlrcloseO". These routines will have to be
customized for different operating systems.
You should also be aware that the engine
can be either case sensitive or not In
respect to the Mask. The dash option M -c"
Is used In "Is" to signal the engine to make
the mask case sensitive. Just about all
disk operating systems will allow you to
enter a disk file name in either upper or
lower case when at the console. However,
how DOS saves the file names in the disk
directory can be another matter. In FLEX,
the "-c" option tells the engine to make the
mask case insensitive. Of course, you can
hard wire the case flag and take out the "-
c" option if you want.
DFAGON FOR FLEX
FLEX requires only that the drive number
be put into a File Control Block or FCB.
Then the FCB structure is loaded with an
action flag instructing FLEX to open the
directory block on the disk using the
"_fms()" call. The address of this structure
is then passed back to the calling routine.
The "dirreadO" is passed this address
(ptr) and is used to get directory entries
each time the "_fms() routine is called with
a "get directory entry" flag set. There is
logic to detect entries in the directory
which are not valid, as well as the EOF (end
of directory entries). The drive number,
file name, and extension are appended
together to make the complete file name
stored in "filename".
The "dlrcloseO" routine is not needed in
FLEX and is Included only as a stub for
systems requiring it.
FILE MASK
The FLEX operating system is a single
user operating system which is essentially
single tasking. Getting file names from
disk directories is handled by system calls
to FLEX via their File Management System or
FMS. The general technique used to access
the directory is that of treating the
directory as a file.
FLEX is designed on the concept of a
default drive for both system (where
programs normally reside) and work (where
data files reside). Because of this fact,
we can assume that if a drive is not
explicitly defined, we can use the drive
number found in the structure element
"FL£X_DATA.work_drive" supplied by the
compiler. This work is done in a routine
call "diropenO". This routine checks the
Mask to see if a drive number has been
defined. The general case for a FLEX file
name is . , ,
drive_juimber.file_name. extension
The drive^number is a single digit
between and 3. The flle_name can contain
up to 8 characters and the extension can be
up to 3 characters.
The routine also gets the name of the
disk and the volume number of the disk.
These two items are defined by the user
when a disk is formatted. Finally, the
routine prints the name and volume number
to "stdout" (the standard output which is
normally the CRT).
The routine "getfnamO" in Dragon is used
to compare a file name with a mask given by
the user in the command line. This routine
calls "mskcmpO" which is a replacement for
the UNIX wild card mask system in the shell.
This is a general routine which can be used
any time you want to use a wildcard mask
inside a program. The function header on
the "mskcmpO" function gives a definition of
the wild card syntax available. While the
syntax is not as powerful as the syntax in
the "sh" and "csh" UNIX shells, it
incorporates almost all the features. The
routine also gives a good example of the
ability of "C to use recursive calls (the
"mskcmpO" routine calls itself).
SORTING
The Dragon uses the "sortinO" function
to sort file names in ascending alphabetical
order ignoring case. The routines
"sortinO" and "nodeO" build a -tree using
the structure "SYMBOL". The tree structure
used comes from an algorithm by Knuth in the
book "THE ART OF COMPUTER PROGRAMMING, VOL
1". The tree allocates memory using the ~C
standard library function "sbrk()". If
memory can not be allocated, an error
message is given.
The "traverseO" routine is used to get
the file names off the tree. When a file
name is retrieved, it is passed to the
"actionO" function where the actual work of
the tool is done. This routine exits once
68' Micro Journal
July 85
39
all the file names have been retrieved.
Because of the general nature of this
sort, it can be used in other programs when
you want to sort variable length strings.
THE "GREP" TOOL
This tool is used to find a pattern in a
line of a file which matches the pattern
given in the command line when calling the
tool. It will search all file names matching
the file name mask for occurrences of the
pattern. The files are searched one at a
time in alphabetical order. When a match is
found, both the line number and the
contents of the line are displayed. The
calling line is given below.
grep pattern file name mask
The pattern is the character string you
wish to search (no spaces are allowed in the
pattern in FLEX) and the pattern is never
case sensitive. The file_name mask is a
legal FLEX file name which can include the
Dragon wild card characters.
ACTIONO
The M action() M portion of the "grep" tool
uses the routine M fstring() M to open a file
and search for the search string pattern.
If the file is opened successfully, each line
of up to 256 characters, is read, copied
into a temporary buffer (linel), and then
searched using the function "finds trO".
INTROL-C does not include "findstrQ" in its
standard library, so it is included in the
program. Some compilers include this
function. -If it is included in the compiler
you are using, and it matches the
definition, you can use it instead of the
one given.
If a line contains a match, the original
line buffer (line) is printed along with its
line number. When all the lines have been
processed, the file is closed and the
function returns back to "t raverseO" via
H action() H , When all files have been
processed off the sorted tree, the tool
returns to FLEX.
THE "LS" TOOL
The "Is" tool is used to find directory
entries which match the given file name
mask. The entries found are listed in
alphabetical order. The syntax for the
command line is given below.
Is [-c(C)l] file_name_mask
The "-c" dash option will make the
file namejnask insensitive to case. The "-1"
option will list the files vertically instead
of the usual horizontal format. The dash
options are checked in the function
"optionsQ".
Is * (or just Is)
Is -c *.txt
Is -1 1.???.*
The first example will list all directory
entries in the current working directory.
The second example will list all entries in
the current working directory ending with
".txt". The "-c" means that both "TXT" and
"txt" extensions will be found. The third
example will find all files with exactly
three characters in their names with any
extension. This last example will list the
entries found in vertical format.
ACTIONO
In the M ls M tool, if no arguments are
given on the command line, we assume that
all files on the work drive directory are to
be listed. If this is the case, an "*" is
copied into the mask .
As in the "grep" tool, the directory is
searched for file names which match the mask
given. Each file name that matches the mask
is added to the sort tree. When the
directory search is done, the tree is
traversed and each file name is passed to
the "actlonO" routine.
The action routine in "Is" simply prints
out the file names either in horizontal
columns or vertically depending on the
command line arguments. One added feature
is the printing of the total number of files
found before returning to FLEX.
CONCLUSION
For those who program in 'CT, the sort
routines can be added to your library if you
don't have "sortQ" in your standard library.
The "mskcmpO" routine ( "msk cmp( )",
"onecmpO", and "maskupO") can be used for
an "in tool" wild card routine. On the
other hand, reading directories "in tool"
with wild cards in UNIX is really quite easy.
A good article on utilizing UNIX "in tool"
40
July 85
'60* Micro Journal
for wild card inquiries can be found in the
November 1982 issue of Dr. Dobbs called
"Expanded Wildcards Under UNIX" by Anthony
Skjellum. If you are interested in adding
complex arguments to your tools, the August
1982 issue of Dr. Dobbs contains a good
library for command line parsing called
"ARGUM" also by Anthony Skjellum.
and 0S~9) can compile and run it. NICE!
Lets have more utility type artices,
especially with a good explanation of how
they work.
DMW
cup for rcax
8r«d Taylor 6
Toa Gllchrlet
For FL£X on 6«09
Utiqg INTROL-C
♦include "fttdlo.h"
tlnclude "MACON. C"
By using 'C, and the Dragon engine
routines, many different tools are possible.
You can probably see how you could write a
"delete" tool to delete all files that match
a given mask. Other tools could include
"list", "copy", and "wc" (word count) just to
name a few. The technique for writing even
more tools is given in the book "SOFTWARE /• ciobaie v
TOOLS" by Kernighan and Plauger. There are chiriit ch[!28i;
at least two versions of the book 1 know of,
one for PASCAL and one for RATFOR. /•
««•« M*ln
V
■*ln{erge,erge)
lnc ergc;
cher **erg»;
/« hold utch string */
(*) Footnotes:
UNIX is a trademark of Bell Laboratories
FLEX is a trademark of Technical Systems
Consultants
INTROL-C is a trademark of Introl
Corporation
Tom Gilchrist
1450 N. Clarence #108
Wichita, KS 67203
Brad Taylor
611 E. Helbert
Mulvane, KS 67110
The source code In this article is available
on the C .Dragon Software Exchange System at
(316) 943-9716 1200/300 baud 24 hours.
FCB *ptr;
char filename I 32J;
tut count ;
if(argc < 3)
ua«ge();
et rcpy< Bitch, erge 1 1 J > ;
at rcpy< sack . erga ( 2 ] ) ;
/• copy erga */
/•* Open Directory for read ««/
per • dlropen(maek);
/*• foed Directory entry **/
vhlle<dlrreed(ptr>fllene«a) I- gRKOR)
i
lf(getfneB(fiLena«a>)
1
•H-count;
•ortlnCf Ueneaa) ;
) /• If •/
) /* nhile •/
/** Sod of Directory ••/
dlrcloae(ptr);
** Also 6809 systems from SWTPC - GIMIX -
AAA Chicago - WINDRUSH - PT-69 - UniBoard -
ST-2900 - MicroKey - Hazelwood and many
others. Any system running FLEX(c) and
Introl C(c) can process these programs.
Which I find very useful. Thanks fellows, j /• grep •/
and we need more of this type article. C
is coming strong and also we still have
many left doing it in assembler, FORTH, PL-
9, Whimiscal, Pascal, and yes, even BASIC.
So no matter what language you program in,
we can sure use your input.
With all the Cobols we have sold, where
are some in Cobol? One nice thing about
'C* If you send in an article with a ) /* u**ge */
source listing in C, then everyone (FLEX
lf(lcount) /* no fllee found */
<
fprlatf(etderr, N \oflad: Bo fllee aetch 'Z»'\B*\«aaa);
uft*ge();
I /• i* •/
traveraeCtreep) ;
/* traveree eort tree for fllee •/
*** Error Routine
««/
uaageO
(
fprlntf(atderr."Ueege: find etring f tle_oeBe\o") ;
exlt(O);
68" Micro Journal
July '85
41
••• action routine
•/
action! a)
char *aj
i
fatrlng(a);
\ /• action •/
•■ fatrlag find atrlng within flla(a)
•/
fatrlng(flla)
char *fUa;
(
FILE *fd;
lot flag.l;
lot J,k;
char lloa(2S7};
Char lloalt25?];
char fllalDOli
/• put on tha Djdrlva ouabar •/
apr lotf(f Hal, H Xd.Xa N ,Djirl«a, flla);
lf((fd-fopao(fllal,* l r* 1 )) — B1BD1)
I
fprlotf(atdarr,"\oBrror Opaolag flla Xa\o" .flla) ;
return;
\ /• H •/
i-flag-0;
whlle(fa»t*Uloe.25o.fd))
i
♦♦lj
atrcpy(llael,llna);
■akup(lloal);
aakup(aetch);
lf(riodatr(l,llaal, aatch))
I
if(lfleg)
I
prlotf("\o-
prlntf("FUa: Za:\o",fUal);
flag- I;
J /• If •/
prlntf( M X5d - la" ,1, Una);
J /• If •/
J /» whlla •/
fcloaa(fd);
} /• fetrlng •/
/•
••• flodatrCpaa, atrlng, pattern)
a
* Thia function aaarchaa for tha pattern in
a tha atrlng atid raturoa tha poaltlon.
a
• Both poa and tha raturnad poaltlon are L baaed.
*/
flodatr(poa ( a ( a2)
lot poa;
cbar *a ( *a2;
char *potl,*pat2,*ell
lot lenl,lea2,c*t;
laol - atrlan(a ♦(poa -l))s
lan2 - atrleo(e2);
IfClanl < lao2)
ratum(o);
al - a ♦(poe -1);
cot - 0;
lanl -- lan2;
whlla(laol— )
-\n");
pntl - at++;
pnt2 - a2;
vhlla(*potl — *pnt2)
I
pott**;
pot2«*;
} /• whlla */
lf(J*pnt2) /• and of atrlng found •/
raturo(cot «poe);
cot**;
> /• whlla •/
returo(O);
} /• flndatr V
la for PUX
by
Brad Taylor 4
To* Gllchrlat
Por FUtX on 6809
Ualng INTHOL C
2/24/84
# Include "atdlo.h"
# Include "DRACO N.C H
/• Clobali */
char flagl;
char tally;
lot nof;
•■■■ Halo
V
maln(argc ( arga)
lot argc;
char ••arga;
fCB •ptr,«dlropaa();
cbar fllanaaatJOh
lot count, 1;
char o »a 1 20);
char ext(S] ;
couot
flagl - oof - 0;
1-1 J
optlon*(argc,arga,&l);
lf(larga[l])
atrcpy(a*ak, "•");
llM
atrcpy(aa*k,argfll|);
/■ coaputa flag option* •/
/• put aaak lo global atrlng «/
If(aaoaltlva)
■akup(aaak) ;
/• lgnora caaa •/
ptr«dlrop*o(Baak); /• attaapt to opao dlractory ♦/
/•• Baad Director!** aotrlaa ••/
*hlle(dlrro*d(ptr,flleoaa») I- BftfcQlt)
\
lf(gatfoaa(flUoaaa))
\
♦♦count - t
•ortlo(fiLanaaa);
} /• If •/
} /• whlla ♦/
lf(lcount) /• no filaa found */
i
print fCNola: No filaa Batch 'Xe'\o" .aaak) ;
utag«( ) ;
} /• If •/
dlrcloaa(ptr);
/• cloaa dlractory */
42
July '85
'68 1 Micro Journal
treverie(traap);
print fC*\ajtuaber of fllei found - X4",naf);
♦** check global option*
•/
optlont(n,pil)
lnt o ;
char **p;
Ut •!; /*
(
lode* of currant argoaemt to paree */
char *cp;
tally - laneltlve - 0;
whiie(— o 44 «(cp - pl*l)) — *-')
<
if(lcplll)
ua«tfa();
alaa
i
ahiia(H+Cp)
•«ltch(tolovar(+cp))
\
caaa "1";
tally- t;
break;
dragon. c
General Purpoee flnd/aort
engine routlna*.
for TSC 6809 FLCX
Ualrtg IKTROL-C
»y
Brad Taylor
Toa Cllcbrlat
# include "flas.b" /* Part of 1NTR0L C V
Ideflne HEME** -I
/• Clobala */
typedef atruct febe PCB;
typedef atruct nd
char *iye;
char *left;
char 'right;
lnt lyuli;
\ SYMBOL;
SYMBOL *treep - NULL ; /• eyaboi pointer •/
char M»k[t28].
char eeniltlve - 0;
lnt D drive;
/* caa« aanaltlvlty flag •/
/* Directory driva number V
caaa c :
eaoeltlve-1;
breek;
default;
uaageC ) J
r /* atfltcb */
r /* alaa */
\ /* while •/
\ I* option* •/
** Error Routine
uaaga( )
putaCtaage; It HUtcH [ f iienae«]W) ;
e«it(0);
\ /* uaage •/
*** action rout in
ectloo(e)
char *a;
i
nef++;
lf(Ueliy 4a flagl** I- 4)
I
lfietrleo(e) <o)
printfCXeWVt-.e);
elee
prlntfCXaVf.e);
r (' It •/
alae
i
prlntfCXeW.e);
flail - 0;
} /* elea •/
J /» action */
»»* Return Pile Neae
•/
getfnea(flle)
cher Mile;
I
lf(lBekc»p(flle.«aik))
*file*'\0';
return(*file);
J /* getfnea «/
/•
•* Sort Syebol Onto Tree
•/
eortln(i)
cher *f;
I
SYMBOL ♦«pereot,*current 1 *nodeO;
perent-ttreep;
whlle(current -'parent)
lf(epclcep(( ,current->eya)<0)
parent *>4(current->le ft);
elae
parent-4(curreot~>rlght);
return(*perent~node(f )) ;
J /* aortin */
/•
••* Construct A Traa Node
V
SYNBOL •node(key)
char 'key;
«
char *cptr;
SYMBOL *loc;
lf((loc - (SYMBOL *) ebrk<el*eot( SYMBOL))) — KEMIRX)
glvaupC*SyaJbol Bucket");
loc->left - loc-> right - NULL;
lf((cptr - ibrk(atrlao(kay)*l))
glveup( "Symbol Definition* 1 );
KEKP.WO
6S' Micro Journal
July a5
43
Dry for teW.wby);
loC->eya - cptr;
etrcpy(cptrtkey);
retura(loc) ;
I /• node •/
••• Glveup The Gboat
V
glveup(why)
char *wby;
(
f print f(»tdrrr,'*tJot enough
emlt(l);
J /• glveup •/
•*• Treveree Tree
V
treveraa(actlva)
SYKBOL •active;
SYTCML •euh;
UCUub - ectlv«->laft))
travaraa(aub) ;
actloa(actlve->eya); /■ perfora action •/
lf((eub - ectlve-> right))
traveraa(aub) ;
\ /* tnvctit ■/
■** Special String Coapare Routine
e«a
*•• Thla routln* treat* upper and lower
*•* caaa Identically.
•/
apclcap(e,c)
char •i.Ui
t
lot cl,c2;
whlle((cl - tolower (**++)) — (c2 - colower(*t++>) 44 cl);
.return(cl-c2);
I I* epclcap •/
'••* Convart String To Upper Caae
«/
■akup(e)
char *•;
(
wtill«(*i - tolovert**))
> /• aakup */
Coapare Afalnat A Mask
Thle fuoctlon c oaf area a given string agalnat a e*ak sod raturna
a I for 'coaperee' or a for "docs not coapare'.
A aaek ii a concatenation of tha following eleaento:
c literal character
? any cherecter Hatch escepc eodetrlog null
(..J character claaa (all of thaaa character*)
{'. . ) nagatad character claaa (all but thaaa eb tract era)
"c nagatad character (all but tbla character)
• eone (natch zero or no re occureoceo)
A cherecter claaa conalate of eero or
surrounded by [ and J:
cl-c2 range of ASCII charectera
cl-c2,,cl-cl eat tl pie rangee
■akcsp(etrlng,a)
char •atrlQg,*aj;
(
lnt k;
char *ep,*eov,etrlng2[126] ;
atrcpy(ep-atrlng2,atrlng);
lf(aanaltlva)
aakup(op);
*hlAe(*a>
\
if(*a ■»•**•)
i
aav - ap;
lf(t*++a)
return( i) ;
whlla(*ep 4a laakcap(ap.a))
♦♦ap;
If('ep)
continue.
ap - aav;
J t* If •/
elae
W(J(k-onacap(*ep.a)))
raturn(O);
elae
• ♦• k;
If('ep)
«-*ap;
) /• while •/
return( t - ep);
J /• Hkcap V
/•
••• Coapare Ooly Ooa Character (for ask cap)
•/
ooecap(e«a)
char •.•■;
<
char c,eetflnd,eetflsg;
char *ap;
lf((c - •(■P^a)) — '?' 44 a);
alee lf(c — T)
t
aetflnd • aatflag - 0;
lf(**+ap --"*)
I
eetflag-1;
++ap;
I /• If •/
sr« of tha following
/* okay aa la •/
for(;(c - «ap) 44 el-*]';**ap)
lf(«ap— *-' 44 a>- *(ap-l) 44
eO •(■p^l) 44 •(ap-l) <- *(ap*U)
\
/* aklp to trailing ')' •/
whlle((c- »(ap*l» 44 cl-']')
eetflnd-li
I /• if •/
lf<sotflnd--»aetfUg}
re turn (0);
alia
return(ap-*j*l);
\ I* elae •/
alee lf(c — '*' 44 *(ap+l) r- a)
return(2)i
July '85
'68* Micro Journal
else lf(c t- ■)
return(O);
' return(l);
\ /* onecap •/
J*
Open Dlak Directory
FCB *dlropaa(neae)
char f niM;
FCB «ptr;
lot 1;
char doame( 16 J ;
lnt volnun;
/• disk file
/« volune *
*/
*/
D_drlwe - PL*X_DATA.*ork_drlve ;
lf(etrlen(aaek) «- 1 it tedlfltCamsk))
atrcet(aaak. ".•");
*) /• a file drive has been opacified •/
lf(a*ik(l|
(
lf{UdlgU<*uJfc>)
i
D_drlv« - •»aek~'0';
■trcpyCaaek.aaek ♦ 2);
} /• U */
> /• If •/
/• Check for driver error •/
If (D_drive <0 | I Ojirivc > 3)
uaage( );
/• See fch for directory */
lf<(ptr-(FCB *)ahrk(slx«of(FCB))) — XEMKRR)
glveupC'dlrectory open.* 1 );
ptr->f .drive - D_drlva;
/• Get SIR •/
ptr->f. function - 1N_0P£N;
lfCfaaCptr.O) — KRROR)
usageC);
ptr->f. function - CET_1MP;
if(_fae(ptr,0) — ERROR)
~~glveup("di rectory open,");
for(l - 0;1<U;*U)
d name [U - ptr->f .f tlenaset 1 1 ;
volnua-(ptr~>f .attrlhutea)*2S6 ♦ ptr->f.rful;
dnaae[llj - '\0';
/* Open Directory for read •/
ptr->f .function - DR OFKK;
lf(_f«a(ptr,0) -« RRROR)
uaageO;
/* print header »/
prlntfC'Dlak; %9 lW\n\o" .dnaae , volnum) ;
return(ptr);
} /• diropcn •/
*** Read A Directory Rntry
dlrredd(ptr, f ilanene)
FCB *ptr;
char •filename;
lnt 1,J;
ptr->f. function - CET_1NF;
**hile( faa(ptr.O) !- ERROR)
(
for(l - 0;1 < «;♦«•!)
fllMaae(l| - ptr->f A lleneae[lj ;
fllename(8J - '\0* ;
lf(*fllenaoe &A I (<«*Uenai*e>U2B>)
I
atrcat( filename,".");
J - atrlen(fllenaae);
for( 1 - 0; 1 < 3; !«♦)
fllanaaelj+lj - ptr->f ,ectenalon| 1 J ;
filename (J ♦ 1] - *\0*;
return( 1);
} /* If •/
} /• while •/
return(BRROR);
J /* dlrread «/
/*
*** Directory Gloae
dlrcloae(ptr)
FCB *ptr;
\
/• Not Ueed In Flex */
I
Bit Bucket
Where Is The CoCo Going?
Editor's Note: We, CP1 (68 Klcro Journal) will continue
to support the CoCo. However,, we sre hearing ssd things
often concerning the s tate-of-affalrs for Tandy (Radio
Shack) coaputera, which Is the bulwark of their returns.
Seeas like the Information 1 relessed soae tine back
concerning their 'old faithful line" of coaputera (Hod els
1,2,3 and 4) la bscoalng aore a fact each day. They are
soon to lose another member. The Model 4 will bite the
dust sa aoae of the othera have. Not that those series
of coaputera ever attracted auch attention In our sphere
of communication. However,. It la to be taken with aore
than a grain of salt, when It cones to the CoCo.
Tsndy haa a nasty habit of running off and leaving
alck and dying models . Moat ahould have been put to
aleep long before anyway, but It sure aakes It tough when
you own one of those little suckers, snd go down to the
locsl store only to be told, '*We don't know nothing about
thst one snyaore." If it wasn't for outside support the
problea would bs aany-fold worse.
Fortunately the CoCo has enjoyed aore than it'a ahare
of outalde support. For Instance, never did ANY Tandy
coaputer have ao popular a group of dedicated magazines.
Of which we were tha very flrat. But not most popular (we
told It like It la or was). Despite Its low cost snd
saazlng power Tsndy looked upon the CoCo aa the 'taken In
orphan'. Simply because lta 'profit per unit' was so auch
less thsn soae of the other systems - now COME) And eoon
It also will be gone, thst Is ss we know It todsy. There
■ay be another "Color Computer Model 7" on the way, but 1
am willing to bet heavily thst It will oot be the low
priced item, It oow Is. Not that It could not be, but
then the pricing will be what the market will bear.
Remember the cost of the original 4K CoCo?
Today I was reading an Industry news letter I receive
esch couple of weeks (you think 68 Micro Journals
subscriptions sre high? - Boy!) snd It seeas thst Tsndy
has lost auch aore aarket share than 1 had though* or
been led to believe. In Europe alone (where aome others
are showing substaotlal galna, Tandy la down froa about
9X aarket share to 31 or less. Also reported waa that
they had taken aasslve wrlte-offa of something like $18
allllon, here In the USA. Beginning to sound like the old
Tl story?
68' Micro Journal
July '85
45
Ail of which saddens me ouch. And I guess 1 really
can't blase them such. If 1 were Tandy, and had the
reputation and preceptlons afforded by their cuatooera
and the general public, I guess I would alao become a "HE
TOO - 1IC BLUE* 1 1 But what happen* when BB takes a aharp
turn?
The CoCo could have been the beginning of a nice and
probably profitable line of Tandy coaputere. Folks really
liked the little jewel. Could be yet, plenty of support
still out there. But fast receding. Hot SB cloned. Just
a nice machine for the average Joe Blow who does not need
a lot of bells and whistles, but does need eupport. But
even now a lot of those who were singing along last year
on CoCo sales are now ill and ailing. Buainesa in the
CoCo world is down, way down. It la a ahane, it could
have been a "Hallmark" of a system and although never
approach the dumber of BB, it could have been a
profitable thing for Tandy, I think they blew it!
We will probably hang in there longer than Tandy does
with the CoCo - but because of you, who spent your hard
earned bucks for a fine little ayaten, that la soon to
get lost. 1 juet hope the something new(?) can pull the
load.
DHU
Otar lirryi
H#m« f if*d #nelo«4 ttiv piptr oi tfc* KSR 43 *hich u«
ditcuttftd over the phone a ffw Ntfl* *90 . 1 upc«r«)y hop*
that voti cm utt it, and that it Mil! bt of tomt ttrvtce to
•pother 43 Owner.
1 thall be loo*li*l for tu publication »« the future.
tote SiKftV
^>
//
*
U2F0G
One Uhitney Road
Latham NY
12110
USA
Having had the good fortune to aquire a TT
KSR43, I then was faced with the task of
interfacing to the MPS I/O board on my SUTFC
6800 computer. I was previously usin$ a IT
ASR33 on the TT current loop circuit of the
MPS in tandem with my CT-64 Video Terminal.
since I was now faced with two RS232 ports to
feed and only one I/O port on the MPS, I
wired a seven section five position rotary
switch to choose one of four Baud rates and
either the CT-64 terminal or the KSR43. The
switch was wired to operate the terminal at
1200 Baud and the KSR43 at 300 Baud.
The TAD circuit board supplied with the
KSR43 needs two jumpers installed for
operation. One junper is wired to pins 4 and
5, and the second to pins 6, 8, and 20. I
found it much simpler to wire the jumpers
directly on the printed wiring of the board.
These are the only modifications necessary to
the KSR43. Standard RS232 connector is used
to interface to the KSR43. A standard male
RS232 connector is used to interface the
female RS232 input on the KSR43, using
terminals 2, 3 r nd 7.
See figure 1 for details of the Miring
on the switch mentioned earlier. It is
possible to simplify the circuit, if you do
not need as many Baud rates as shown.
Good luck. If problems call me at
518-785-508? or write above address.
f
?
*
l eft
i
Hf
+7>
NT
-t~=*
fl.
f
>i^vi
I Mould like to coowient on ta«o
articles in the May 1985 issue of 68HJ.
First, in Bud Past's N C N User Notes, there
is an aebiguity in the example on page 15
that reads
if (n < 10) aCn++)
n|
In this example, the value of the
subscript is the current value of M n"
(before incrementing it> 9 but the value of
"n" to the right of the equal sign may be
either the old or the new value. Which
value will be used depends on the compiler
and is not specified in the definition of
the C language. For example if M n* has
the value 5, then the assignment i s to
aC53« but the value assigned could be
either 5 or 6« depending on whether the
N n M to the right of the equal sign is
evaluated before or after incrementing it.
This situation, using a slightly
different statement, is discussed by
46
July '85
68' MfcfO Journal
Kernighan and Ritchie in "The C
Programming Language" at the end o-f
Chapter 2 on page 50.
Regarding Peter Dibble's call -for
games -for OS-9 (in OS-9 User Notes), I
have written a program -for my SS-50 OS-9
system that plays cribbage (a card game).
Since I wrote it in C, I can (and have)
ported it to an MS-DOS machine and this
version is currently in the hands o-f a
software company -for evaluation. Sharing
the OS-9 version o-f cribbage is partly
dependent on what happens li 4 anything) at
this or some other company, but also
awaits working out another problem.
Making cribbage run on "all" OS-9
systems is a problem due to the various
terminals that are being used. The
program uses cursor positioning and "clear
to end o-f screen". The character
sequences -for these vary considerably
among different kinds o-f terminals. Even
screen sizes (number o-f lines and columns)
can vary somewhat. I am currently using a
16 by 64 display with my OS-9 system,
while most terminals are 24 by BO.
Building in one particular screen size and
one particular set o-f special character
sequences is not hard. It is much harder
to make the program configurable for ANY
terminal. I would be interested in any
suggestions along these lines. A few
possibilities come to mind, (1) A
separate configuration program could be
written which asks the user about the
terminal being used and writes a data file
with appropriate information. <2) An
ASCII file containing the configuration
data could be set up by the user
(following supplied instructions) and the
program could read this file when
starting. <3) The C source could be
supplied and the user could be required to
edit the source for the termi nal -dependent
functions and then compile (and link) the
result. A few "standard" configurations
could be supplied. (4) A set of
teroii nal— dependent subroutines could be
written as a separate module which would
be callable by cribbage (and other
programs as well). This module would be
written by the user for his/her particular
terminal, though a few sets of these
subroutines could be supplied for
"standard" terminals. (5) The
configuration file of an existing program,
such as Screditor III or Dynacalc. could
be used, which of course requires the user
to own at least one of several commercial
programs. For example, I use Screditor
III for editing, Cribbage could be
written to use Screditor 1 1 I r s console
configuration file to determine which
sequences to use for cursor positioning
(etc.) and how big the screen is.
It would be desirable to be able to
use the configuration information with
other programs besides just cribbage. All
of the above except number 3 could be used
this way. Number 4, however, does not
take care of the screen size differences,
but otherwise is rather intriguing.
In summary, one of the difficulties
in writing games (and other programs) for
systems that use terminals is the problem
of accomodating the differences in
"control sequences" among various
terminals. Is this a problem that could
be "solved once" and then used by
everyone? I am interested in how others
have approached this problem. Other 68MJ
readers may be interested also.
Jim Howell
5472 Playa Del Rey
San Jose, CA 95123
MRDY and the "Synchronizer Problem"
Malcolm D. Muir
Computer Excellence Inc.
P.O. Box 8442
Coral Springs, Fl. 33075
(305) 752-8321
Recently I discovered the cause of a
rather nasty intermittent problem in a
system in our office. Since it appears that
other users may have the same problem I
hereby pass on what was found.
When it appeared in our environment
the main symptoms were picking up extra
characters with the system sitting in an
input loop and other I/O related errors. In
our case these extra characters would
appear about once every 10 minutes.
When the problem was finally trapped
on a logic analyzer it became obvious that
this was an example of the "synchronizer
Problem".
Over the last ten years there have
been numerous papers published about the
"Synchronizer Problem" or the "Metastable
Flip Flop" problem. In essence the theory Is
that If a flip flop is given a runt signal to
change state it may partially change state.
This tends to show up as one of three
behaviors at the output as a function of the
design of the flip flop. Either the flip flop
may do an Imitation of a one shot producing
a pulse output rather than a full state
transition, or it may oscillate producing a
burst of pulses (or sine waves) or it may
sit with one or both outputs in the
transition region. With a clocked flip flop a
runt signal may arise from violating the
'68' Micro Journal
July 85
47
setup and hold requirements of data with
respect to the clock. According to theory
ALL flip flops will produce this behavior to
a greater or lesser extent.
The SS-50 bus problem with
synchronizers occurs with the MRDY signal.
Not MRDY is typically generated by a one
shot and is used to slow down bus cycles for
I/O etc. The 6809 samples MRDY with an
internal free running clock and if the
sample occurs during the transition of MRDY
a metastable state may occur. What was seen
here was that when the metastable state
occurred the first i/4 of the instruction
following the slow cycle had disappeared and
that instruction did not operate correctly.
The window of vulnerability is quite small
and small changes in loading of MRDY may
significantly change the error probability.
As a function of exact timing, data and
address patterns, one shot jitter, power
supply regulation, noise, etc. the error
probability may be expected to vacy widely.
NOTE: The 6809 spec sheet talks
about synchronizing MRDY to the internal
clock for certain early mask sets. That
requirement relates to the leading edge of
the wait signal. This phenomenon relates to
the trailing edge of MRDY and is present in
all 6809 processors. Motorola does not
publish any spec information on the trailing
edge timing requirements.
The symptoms mentioned here were as
a result of metastable behavior caused by
the slow I/O one shot on the backplane. The
same phenomenon, in other MRDY one shots (
DMA disc controllers, etc ) would show
different symptoms.
This phenomenon is not easy to
detect (It was never visible on an
oscilloscope) but it is easy to fix. Replace
the timing resistor on each MRDY one shot
with a pot (choose a pot with a value
greater than the resistor which is being
replaced, up to twice the value). The pot
should be Installed with the wiper and one
end to one lead and the other end to the
other lead. Adjust that pot for a time
interval on MRDY low which is about half way
between the Intervals which cause £ clock to
change delay. If mounting a pot is
impractical due to mechanical constraints
temporarily wire in a pot and adjust it,
then without disturbing the adjustment
remove the pot and measure the resistance.
Install a fixed resistor with a resistance
as close as possible to the measured
resistance.
If you switch CPU cards it may be
necessary to readjust the pots.
Floating Point Library for the 6609:
Ue would like to Inform the readers of r 68 *
Plicro Dournal about our nou FAST/09 Floating
Point Package for the 6809 chip. Its fast exe-
cution times, number of implemented functions
and ease of use make it particularly useful
for industrial and scientific applications:
- Code size 2Kbytes, PIC, re-entrant
- 32bit Real format, 7 significant digits
- Trig functions: SIN.COS.TAN. ASIN , AC0S, ATAN
- Logarithmic functions: LOG, LN, PUR , e"x,10"x
- I/O conv/ersions: ASCII/Float, Float/ASCII
- 16bit Integer/Float , Float/integer conv's
- All parameters passed on 6609 user stack
- Optimized instruction timing using Cheby-
shev polynomials
- Integrated FORTH interface
The library is available under FLEX, OS-9
(Slnch) or ROD, Please contact
Amreln System Ingenleure
Gerberstraase 1
CH-4410 Liastal, Suitzerland
Phone (061)91 3045
for further informations.
45 COOK ROAD,
NBWLANDS,
CAPB TOWN, 7700
SOUTH AFRICA.
DEAR DON,
RB: LOG.CMD 68MJ MAY 85.
ANOTHER BUG HAS COME TO MY ATTENTION.
THE VALIDITY OF THE FILBSPBC IS NOT
CHECKED. THIS CAN BE EASILY CORRECTED
BY INSERTING 'LBCS BAD' AFTER THE LINE
'JSR GBTFIL'.
YOURS FAITHFULLY,
JOHN RITCHIE.
Dear Mr. Williams:
In your April 1985 issue I saw an
announcement of a hard disk system from
Wellwritten Enterprises. I had been looking
for a hard disk to install on my OS-9 system
and wrote Wellwritten to ask for a brochure
describing their system. What I got in return
was not a brochure but a two- page, single
spaced description of their system and the
purchase options. It provides much more
information than the announcement did.
I have enclosed a copy of the letter
because the information in it may be
interesting to readers who are considering
moving up to a hard disk* (The copy of the
letter is not as good as I would have liked
because it was typed with a brown ribbon on
cream colored paper . )
Since I received the letter, I have
spoken to Tom Weaver of Welwritten and he
48
July BS
'68' Micro Journal
told me that they are currently completing an
interrupt-driven version of the SS-30 host
adapter card. He says, it runs even faster
than the current programmed input/output
model.
Keep up the good work.
Sincerely,
Kenneth Drexler
Dear Sirs,
We are writing you to let you know of a new bulletin
board being operated in the Forth Worth - Dallas (Tex)
area for the benefit »f TRS-80 Color Computer users.
TBBS Fort Worth Is available 24 hours dally at (817)
232-2087, at either 300 or 1200 baud.
Unique feature* ot TBBS Fort Worth Include bugs and
fixes for Tandy's Color Computer software line, numerous
technical reference files, and a Urge database of public
domain software, Including quite A few 0S-9/BAS1CU9 files.
No fees are charged, and first time callers have full
access to the board with the exception of leaving
messages In public view. Registration requires only a
name, addreis and telephone nuraber, and higher access Is
usually granted within 12 hours.
We would appreciate anything you could do to help
spread the word.
Thank you,
R. Wayne Day * aysop
T8BS Port Worth
JMIC%@NICS
«Jt} LYNN AVENUE.
taBOTCFOiD.
mutism COLUMBIA.
CANADA. V2SIE2
ffunimfltn- Bm< — F ind Spftwm>r
OIMIX* Sato. ^vi» *od Supjun
68" Hlcro Journal
5900 Cassandra Smith Kd.,
Hixson, TN 37343
Dear Don,
From time to time 1 use TSC's EDITOR to edLt XBAS1C
programs, particularly wherer global change* become
necessary. As you know, TSC's BOl character defaults to
a colon, which makes It Impossible to edit this VERY
common character In XBASIC lines without the hassle of
redeflnlrg the BOL char In the EDITOR. Similarly with the
DCC (Dor"t Care Char). So 1 decided to patch EDIT to
inltiallie Itself to characters which are rarely found In
TEXT editing, and while 1 was about It I also set up the
TAB chat to a backslash (/). EOl was set to a tilde (~)
and DCC to a grave accent (*). Th* changes to accomplish
this are :
1. Using the system monitor, set address-range 0000 -
1AFF to 00. then return to FLSX and execute CET
0.EDT.CMD
2. lack to system monitor, and ualni the Memory Examine
and Change function locate the HEX str'.ng B6 CC02. In my
version of EDIT thl* occurs at address 0353. so yours
should be close.
3. Commencing at address 0353 enter the following code :
Oi53 86 7E (EOL separtator equals *)
0355 A7 C821
03 <* B6 CC00
035B A7 C8I0
033E B6 CC07
0361 Cb 60 (DCC equal )
0363 ED C81E
0366 B6 CC0J
0369 A7 C820
036C 86 SC (TAB equal /)
4. Return to FLEX and execute SAVE 0.ED1T.CMD 0000 IA07
0000.
Of course. If you have a D1SXED1T utility command, It la
easier and quicker to edit in the changes directly to the
sector concerned.
Another problem with TSCa EDITOR is that no calls can be
made to other FLEX utilities. The following patch solvea
thla problem.
1. As above, GET the EDIT command into memory, and locate
It Directive Table * quite near the start of memory, We
are going to remove the directive OVERLAY to make room
for a new directive fLEXCMO. Anyway, who would use
'OVERLAY' when the shortened form '0' Is available?
Unfortunately, the directive MUST be in alphabetical
order, so we have to bubble-down a block of memory to
wipe out OVERLAY and make room in the Ta for FLEXCHD.
2 . Thla Is done by moving the block commencing with FLUSH
and ending with N 00 xxxx (where xxxx will be some
address) forward by 10 address locations. In my version
of EDIT, this means moving the block 0088 - 00EC to a new
position commencing at 0092,
3. Now, commencing at location 0088 I entered FLEXCHD 00
19A3 (19A3 being one location beyond the last address
occupied by EDIT). This can easily be found beforehand
with HAP command. ignore the address of the final
solitary byte, which will typically be displayed aa 1A07-
IA07, as this Is the start of EDIT's buffer. The word
FLEXCHD should, of course, be entered In ASCII as 46 4C
45 58 43 4D 44, That's the most difficult part done!!
4. Finally, we append the following code commenclog (in my
case) at 19A3 r
8E ([» BJ) BD CD IE BD CO IB BD CD 4B 7E 00 03
00 0A 4o 4C 45 58 20 43 6F 6D 6D 61 6E 64 20
2E 2E 2E 04
and then do step 4 of the first example above.
You are now all set, but keep In mind that no FLEX
command which would overwrite either EDIT or ita buffer
should ever be called from EDIT. I would NOT recommend
making this last change with a D1SKEDIT command, unless
you are VERY familiar with the structure of binary files
on disk, as the number of bytes In the final block of code
has now been changed, and you will also have to re-enter
the code for the atart-of-buff er and the link address,
which will have been overwritten by the changes above.
Siaesrsly,
ill
I. </*■•
Prt«ld*Dt
ITYETRONICS)
TYPESETTING ♦ TEUCOMMUNICATK)*^ TYPESETTING • TYPESETTER INTERFACING
POBotlil 4ft* C m*m. ttafto f a*V C S34&
From; Gary J. Duarte, Tyetroolcs
Date: January 3}, (985
Re: For Immediate Release:
Tyetronlcs and Stylo-Software, Inc. team up with a high
level word processing system to drive the major
typesetting devices. Gary J. Duarte of Tyetronlcs, has
announced he haa reached an arrangement with Stylo-
Software, inc. of Idaho to develop a powerful word
processor that will fully drive the major digitized
typesetting devices. Stylo-Software, inc. owner of Stylo-
Craph word processing will be integrating total
typesetter coding loto this already successful program,
this and the typesetting program will be called Stylo-
Type. The program Is being moved from 6809 technology to
the MC68000 chip to run on the Apple Macintosh system.
This program is not just an interface to the typesetters,
W Micro Journal
July 85
49
buC a alcro font end ayatem. The Hacintoah ayatem
eventually will be able to generate "What you aee la what
you get" from lta screen to the dot tutrix printer and
then ultimately to a typesetting output device.
The Stylo-Type prograa la estimated to coat about $1,500.
A total ayatea configuration for the Stylo-Type prograa,
coaaunlcatlona , Macintosh, and the Apple lmagewriter
printer for proofing purposes la expected to run about
$4,995 through $7,995 depending on the options.
Stylo-Software, Inc. la a certified developer for Apple
coaputer ayateaa. Stylo-Type veralon 1.0 la expected to
be a baalc Interface prograa without the display
capability. This veralon will be available In February of
"85. The first output device driven will the the
Hergenthaler CRTronlc faally of which there are aoae
5,000 In the field. The Hacintoah Stylo-Type ayatea will
be a powerful Input atatlon for the CRTronlc ovnera. It
will alao provide a word proceaslng oriented typeaettlng
Input device for advertising agencies, publishers, author,
prlntera etc. and once their inputting is coapleted, they
can phone download for the typeaettlng output.
Tyetronlca la alao aettlng up typeaettlng throughput
facilities, the flrat one In Idaho Falls, ID and the
aecond In Reno Nevada which will aervlce the Hacintoah
front end ayateaa aold. However, the Stylo-Type ayatea
will be capable of typeaettlng lta files to any CRTronlc
ayatea world wide equipped with Hergenthaler LCI
coaaunlcatlona prograa and a apeclal configuration for
the CRTronlc.
Tyetronlca and Stylo-Software, Inc. will continue to
develop specialized prograaa for the graphics lnduatry.
One apecialty prograa nearly coapleted la a aeal-
autoaated book aanuacript/caatoff paging and page coat
eatiaatlng ayatea. Stylo-Software, Inc. alao la aovlng an
entire group of prograaa to the Hacintoah ayatea which
include accounting, databaae aanageaent, terainal
coaaunlcatlona, aail Hats, spelling, etc. that will
enhance a full line of STYLO Integrated aoftware.
For aore Information you may contact Cacy Duarte or of
Stylo-Software, Inc. (208)529-3210.
cimix
tx. *»i*«itjft*AuA£f • c~xmo n.imomm
PRESS RELEASE
68020 DEVELOPMENT SYSTEMS TO BE INTRODUCED AT THE 1*85
NCC
BOOTH #3726
The GHX 68020 la a multi-uaer, aultl-taaking, demand-
page, virtual aeaory ayatea. The CHX 68020 haa
provisions for an optional 68881 floating point co-
processor.
The baae ayatea hardware includea 512K Bytea of high
apeed RAH, 3 intelligent aerial porta, a J9MB hard dlak,
and a 1 HB floppy dlak. The power aupply of thla
expandable ayatea uses a conatant-voltage, ferro-reaonant
traoaforaer and haa aufficlent reserve capacity to
aupport additional uaera and aultiple high performance,
bigh capacity, hard diaka. Intelligent Serial I/O Boarda
significantly reduce ayatea overhead by handling routine
I/O functlona, freeing the hoat CPU for running uaer
prograaa. Thla laprovea overall ayatea performance and
allows uaer terainala to be run at up to 19. 2K baud.
The UnlFLEX VH Operating Syatem, is aodeled after UNIX
Syatea V and Is written in aaaeabler code optiaired for
rapid execution tlaea and kernel coapactneaa. As a
reault, UnlFLEX runa aeveral tlaea faater than UNIX
ayateaa, handlea aore uaera acre effectively, and leavea
aore dlak apace for the end uaer. It la UNIX coapatlble
at the C aource level. A GHX version of Hotorola'a 68020
Bug la alao Included. Languages available include Ada, C,
Cobol, Fortran, Baalc, Aaaeabler, Franc Llap, Prolog.
Export aodela are available.
For further Information contact:
Richard Don at (312) 927-5510
ClHIX, Inc., a Chicago baaed alcrocoaputer coapany
eatabliahed In 1975, haa produced atate of the art
alcrocoaputer ayateaa baaed on Motorola 6800 and 6809
alcroproceaaora . ClHIX ayateaa are in uae In lnduatry,
Hospitals, Univeraitlea, Research Organlcationa, and by
Software Developera. CIMIX waa awarded the preatlgioua
Preaident'a "K" Certificate for Export a In 1984.
We Invite you to vialt the GIH1X booth #3726 at NCC to
see the GHX 68020 Superalcro at work*
DEMAND-PACED VIRTUAL-HEHORY OPERATING SYSTEM
FOR GMX 68020 DEVELOPMENT SYSTEM
Chapel Hill — Technical Systems Consultanta, Inc., haa
releaaed a demand-paged virtual-memory veralon of lta
UnlFLEX' Operating Syatea which la specifically optimised
for the GMX 6K020 Developaent Syatea manufactured by
GIHIX, Inc.
Thla releaae la the culmination of yeara of reaearch and
developaent into aoftware deaigned exclusively for the
Hotoola 68xx and 68xxx faally of alcroproceaaora.
Although the UnlPLKX ayatea offera moat of the featurea
found in UNIX" ayateaa, lta performance la dramatically
better due to an aaaembly language implementation and
apeclflc optimisation for the Hotorola 68xxx family.
The UnlFLEX ayatem la the only currently available demand-
paged vlrtual-aeaory operating envlronaent which la
specifically deeigned for the 68020 and which aay be
adapted to ayateaa ranging from R0H baaed applications,
to eingle-uaer, aultl-taaklng workstations, to full multi-
user, multl-taaklng, tlme-aharlng ayateaa. A typical
kernel, without any device drlvera will reside In
approximately 28K of memory. The kernel with I/O drivers,
variable storage, and all atatlc tablea will realde in
approximately 50K to 60K of aeaory. Approximately 1.7
Hegabytea 9f dlak storage la required for the operating
ayatea, utilities, aaaeabler, loader, C compiler, C
library, and help files. An additional one to three
megabytea la required for awap apace.
Technical Syateaa Consultanta, Inc., vaa formed In 1976
and specializes In operating ayateaa, languages, and
utilities for Motorola 68*x and 68kxx faally of
alcroproceaaora. The aultl-uaer, multi-tasking, UilFLKX
Operating Syatem haa been running on 6809 baaed hardware
alnce September, 1980. and on 68000 baaed hardware alnce
October, 1982. Purther information may be obtained from
Technical Sytema Conaaltanta, Inc., ill Providence Road,
Chapel Hill, *C 27514 9.9-493-1451 or TWX 510-920-C540 TSC
CPEL.
Contact: Doa Slokievici
Director of Marketios
TttboicAl Systems COfltultaoti , lot.
1)1 Frovid«oc« Road
Cb*j>el Bill, HC 275U
<919) 493-U51
■■w>
fC HO' E<* S*«»*l«4n BMf
MCTOKQLA aJmOffmCES mmV
mcmorucissoi development system
Phoenix, April 2), 19&5... Hotorola announces the H0S-
300-a low-coat microprocessor/microcontroller Hardware
Development Station that provides real-time
hardware/aoftware emulation aupport for the MC68HC11
Hicrocomputer an! the MC6809/MC6809E and Ho801/03
Microprocessor Families. The H0S-300 la a ataid-alone
development ayatem that requires only the target object
file from the hoat system. Almoat any terminal with a
atandard RS-232C port can L* uaed with HDS-300.
50
July '85
66* Micro Journal
By selecting the proper Emulator Module, users can
Interface the HDS-300 to a variety of Motorola
Microprocessors. The HDS-300 consists of a control
station with a built-in 5 l/4" disk drive for program
execution to the target code, user macros, and terminal
configuration data. It also features a real-tijne slgnal-
traclng bus state monitor, a built-in
assembler/dlsaasembler for the target processor, external
synchronisation I/O for opertlon with other development
tools (or multiple processor opertlon), built-in real-tlm
trace with disassemble, 32Kb of high-speed RAM
(expandable to 256Kb), and bus transfer rates of 4MHz,
with no wait states.
The HDS-300 allows software and hardware to be
developed and tested a t an early stage of the development
process, permitting hardware configuration and software
code changes to be made while still at the prototyping
stage. Original algorithms and I/O parameters can be
tested before the final software code Is written. After
this stage Is completed, a source program is prepared by
using the host's editing facilities. Three suitable
development hosts Include the VHE/10, the EXORmacs
multiuser station, and the IBM PC (and compatibles).
For development support oo the MC68HCU, the MC68HC11
Cross C Compiler provides an efficient, high-level
language for product development. For hosted
environments, Source Level Debag (SLD) allows applications
wit ten In "C" to be compiled ar.d/or assembled then linked
Into Common Object File Format. The code Is then
downloaded Into the HDS-30 station's emulation memory.
Comprehensive diagnostics, including a power self-test,
are Included with HDS-300 system.
CERTIFIED SOFTWARE CORPORATION
READER COhftACT.
CARYTMARAUSON
(602) 4^3060
MOTOROLA ANNOUNCES A HIGH SPEED 64K STATIC RAM FAMILY
Austin, Texas, April 8, 1985... Motorola Memory
Product* Group announces a fatally of high-speed 64K
Static Random Access Memories (RAMS), fabrtcted ualng
Motorola's high performance second generation silicon-
gfite HCMOS HI technology. The 8K<8 Bit MCM6164, which
wlLl be sampled early third quarter 1985, will be followed
by the MCM6188, with 16K X 4 Alt organization, and the
b4K X ) RU MCM6I47.
Thla 64K SRAM Family follows a high performance
tradition recently established by the MCM6168, a 4K X U
static RAM designed with 1.5 micron design rules to
provide maximum density and reliability. These fully
statU RAMs contrlhute the speed necessary for cache
memory, video applications, engineering work stations, and
automated test equipment (ATE).
An Improved add ress-t rans 1 1 Ion - detect Ion (ATD)
technique Is empLoyed to optimise speed » achieving maximum
access times oE 70 nanoseconds for the MCM6I64. The
enharced ATD design has been male Impervious to address
skew and fast voltage spikes.
'he availability of postlve- and negative-logic Ghlp
En^>le pins provides more eystem design flexibllty than
slrgle Chip Enable devices. Output Enable Increases data
bu* control. Operating from a single +5 volt (+10X) power
4ujply, the fully static design eliminates the need for
external clocV.8 or timing strobes. Low maximum power
consumptions Inherent In HCMOS designs are maintained
with 60 mllltamps (oA) In active mode. 5mA maximum standby
(TTL levels), and 2mA maximum standby at CMOS rail input
levels.
Th«se 64K faat atatlc RAMa will he available In 600
mil, 28-pln plastic dual In-line packages (DIPs) with
JEDKC standard plnout. Sampling for the MCM6164 Is
scheduled for July, 1985.
Rrader Contact: Rob Crv«?rif*?id
6f6 CAMINO CABALlO, NlPOMG CA. <?344d
USA TELEPHONE 805 34^0202 TELE* 467CH3
Larry Williams
■68' Micro Journal
5900 Cassandra Smith Rd,
Hixson, TN 37343
OMEGASOFT PASCAL
Thank you for your phone call the other day,
I hope this short note will answer your
questions.
First of all, Certified Software Corporation
is the manufacturer of OmegaSoft Pascal and
related products. We have recently moved to
the address shown on the letterhead, please
update your mailing list and subscription
address.
We currently have five products to run on
6809 systems using the OS-9 (TN Hicroware) ,
FLEX (TM TSC), and MDOS (TM Motorola)
operating systems. These ate the Pascal
Compiler (including debugger) f Relocating
Assembler and Linking Loader, 9511 option,
Screen Editor Kit, and Multi-Tasking Kernel.
Our Pascal Compiler is based on the
international standard but has many
extensions for use in industrial control and
other real-time applications.
We also have a PASCAL COMPILER package to run
on 68000, 68008, and 68010 systems using the
OS-9/68000 (TH Hicroware) , VERSAdos (TM
Motorola), and CP/M-68R (TM ORI) operating
systems. This package includes the compiler,
relocatable assembler and linking loader,
screen editor, and several utilities. The
debugger is currently under development and
will be available by July 85.
1 will contact you regarding a review of the
68000 product when the debugger is available.
Please send current advertising rates and
conditions to the above address.
Sincerely,
^^-^ Tk^JjL
Robert Reimiller
President, Certified Software Corporation
FOR IMMEDIATE RELEASE
Linda Kahn — Publicist
(213) 478-7398
5p92S<7*Q>
FREE FORTH li^EKEST GROUP MghflE&SHlP AWARDED TO AUTHORS
OF _FORjy^ElATED ARTICLES
San Jose, CA, Apr. 17 — Free FORTM Interest Croup
(FIG) membership Is now available to authors of Forth-
related articles. To qualify, just publish an article at
least one page long In * non-Forth publication. Authors
of Forth-related letters to an editor are eligible ffr a
$10,00 membership discount.
The FORTH Interest Croup Is a worldwide non-profit
memher-supported organization with over 5.000 members and
70 chapters devoted to the Forth computer language. FIG
membership of $20.00/year ($33.00 foreign) Includes a
subscription to FORTH Dimensions, a bi-monthly
publication. FIG also provides an on-line data base, a
Job registry, a large selection of Forth literature, group
health and life Insurance, nembershlp discounts, and many
other services.
For additional Information and a copy of the Author
Recognition Guidelines call the FIG HOT LINE (415) 962-
8653 or write FIG, t>.0. Box 8231, San Jose, CA 95155.
'66' Micro Journal
Juiy '85
51
dp. Johnson
microcomputer consulting
76SS MMrthwett cedocM •tir«*f - poflUnd. <wv» 77Z23 • I503> 244-S1S2
NKW PRODUCT ANNOIJNCEHKNT
The MMl-A One Megabyte dynamic ram board
for SS-50C bus systems is now available 1-2
weeks ARO. The MM1 expands an SS-50 6909
system to its maximum available memory. On
board switches allow disabling portions of
memory for I/O and ROM space. Standard
settings cover most applications. Special
custom settings can be supplied for unusual
situations. Price for the 2 Mhz version
fully populated is $995.00, the 2.25 Mh2
version is $995.00. Both versions run at
th^ir full rated speed with fully
transparent refresh and arc compatible with
DMA disk controllers. Quantity discounts
available. For more information contact:
Dan Johnson (503) 244-8152.
JOHN ALPORD
I regret to inform that John Alford died
March 19, 198 5. Survived by his wife, Sally
and their five year old daughter, Sarah.
John was best known for his 'SCREDITOR'
series of editor/text processors, sold
originally by ALPORD & ASSOC, and presently
distributed by Wlndrush Micro Systems. Also
John was one of the early designers of
efficient digital speech systems and related
microcomputer applications*
John was also known for his Christian
remarks sections of his (Alford & Assoc.)
advertising In various publications.
I first personally met John, Sally and
daughter Sarah at one of the early Philly
Computer Shows. And I can truthfully say
that I never met a nicer person or family.
John was sincere and honest In all his
business dealings and I frequently received
mall and other communications from various
sources, remarking on his courtesy and
attention to their needs. John Alford will
be missed, not only by his family and
friends, but by the entire 68XX community.
Professionally John Alford was one of
the very best. But more Important was the
man - A good husband and father, an honest
business man, an excellent example of his
Christian faith and - a good friend. I will
miss John Alford.
OMW
Classified Advertising
1HU1YPC *>d»l 43 PftlNIER •ifch ttrial (RS232) Interfere, and
full ASCII keyboard. UKf *W - htm cost $1295.00 - ONLY $339.00
reedy to rm - Cell torn - terry - Bob, CPI 615 842-4600
**•
1 - SUIPC 6809 eyetee m 6*00 box - 36K. per, *>r porte - $200
1 - SUIPC 0MTAJ diek «y«tc» - DMA 2 B" drives, ceae - $200
3 - CAXD1SX 8* drjvee - OS, 00 - $30 ee
2 - SUIPC 6809 CPU boerd - $75 ee
1 - SUIPC 6809 CftJ boerd - elaoet «orke - $23
I - SUIPC AC30 ceeeette interfere - $30
1 - JAJtCO JC610 par keyboard, cese - $40
I - RADIO SHATK 26-2023 diek drive, cmam - $100
1 - 0AIETL (16H S4LECIR1C 1/0) printer, par - $130
2 - BAST 3" drive* SS.DD for perte - $20 ee
4 - SUTPC (nOIDROLA) 32K dynamic eeaary - $75 ee
4 - SUIPC Bk etet ic neaory - $30 ee
3 - SUTPC M*-IA parallel 1/0 $20 ee
i - SUfPC K>-T | iHer . $20
I - Stork CT-P5 aerial /parallel 1/0 - $20
I - JPC TC-3 hi-apeed ceeeette 1/t - $20
1 - JPC CK-7 clock boerd - $20
i - SUTPC M»-B3 nother boerd - $30
1 - FAO 8*3-1 either boerd - $>0
i - TW WC-1 1/0 disk controller - $40
1 - Thomas 64k 16 video boerd - $75
i ~ Oigitel fteeearch 32K eUtic - $5D
1 - 050 32* etet ic/t PROM - $30
1 an PASCAL - Color Coeputer - $40
ell documntetion - poet paid on email item
Gil Snettuck Rt 2 Bo* 445 Hillrfjoro HH 03244 <603) 464-3650
evening
eee
GIMlx 6809+ (70 with Gi«l> OAl , SSB DCB-4A disk controller, 059
level 1 with 0C8-4A driver $9?5/offer
Dick Ollendorff <201)85?-6764 ef ter 7PM
eee
GIHU pebe, 8-perellfl porte $80, 8 aerial porte $120, touch- tow
receiver $100. 16-b-tton key peth $3 3, 6800 -CPU with tieere $60,
votrek voice eynt. $*0.
Teletype^! with R5~232-int. $250
Phone 201-662- 182f
Users'
Group
Over 45 volumes of public
domain software including:
• compilers
• editors
• text formatters
• communications
pa;kages
• many UNIX-like tools
Write or call for more details
The C Users' Group
Box 97B
McPherson, KS 67460
i3t 6) 241-1065
52
July '85
68' Mtao Journal
powerful color graphics
Uses Ihe new TMS9916A Video D«
play cocesOr MK**> resolution 256 x
tg; p»»ei dtaprey with 15 cok»t i6k
eytesofonboard RAM does rxrt reduce
user memory 32 graohtc images can
u» ~*n tduatry moved wiin simple X V
commano&'i** ^mooln animation.
Eilernal Vtdeo+npui allow! stibhtling
NTSC composite vidtooulpul
SOUND EFf ECTS AND mosk.
• Three AY3 B9I0 Programmable
Sound Genersiorv
• Nine simultaneous voces
e Three inoependenl no*ae sources
e Onboard stereo emptier drives two
a ohm spea^eti
AJ>DI TtQNALl/ QCAPAB<LfTlES
• Eight analog input* wiih & b*t mio-
lufldn
• Supports fair royslicks with pushpui
ion switches
a E«gni b<l pa artel t/Opori
a Entire onil maps mlo 256 bytes ol
memory
TERMINUS DESIGN IMC* in eoniunb
tion w«1h Mrcro«jfe Svsrems Corpore-
lion (ft Proud 10 annoy nee FBASIC an
enhancement of Mtcroware'a 6500/
BASIC Their last compUed BASIC has
neen adapted lor 6809 ueert win adoed
ytdeo and sound loaturas for ARCADE
SO users FBASIC «& a Irue romper
that produces Ophrmied mac hma lacv
guaea modulei wrtch are ROMab% and
require no Run Time pacMOa FBASJC
requires less memory overhead end
tuns hundreds ol limes faster lhan
BASIC interpreters II suPPOrla elan
dard BA tC inslrucl<on including
SrrKig fundion*. 0«k I/O and fast *itege*
Sfilhmelic wilh multtefe- precision cape-
brhly Graoh »es ^iMbS and funcltons lolly
support ihe Arcade 50
ARC AD t SO Assembled and l**l«d
Video and AudJO connector sol
4 Joysltck connector set
2 Radio Shack Joyvick*
Gold Mo*e« connectors
A BASC lor 6800
FBASIC lor 6809
FBASIC I with ARCADE S0|
ARCAOE SO RGB
LABViOEO t Motorola t xORbuSi
NEW MV096809 Processor Board
256K Oynamc Memoiy Board
256K Dynamc Mornory Board Iw 64Xt
64K Dynamic Memoiy Boa'd
5325jOO
1500
1500
24 00
1200
11000
UOQO
75 00
375 00
37500
225 00
795 00
395 00
295 00
IIIUl t \%ll S*Sl Ml
TERMINUS DESIGN INC
lb SC ARBROUCH ROAD
ELI EN WOOD, CA 30049
(404) 474-4866
III NEW PRICES III
n
Ml' Jfilkll
TE -
pfffiaiifj
2$6K, 512K, 1 MEG MEMORY SYSTEM
Ny» compatible *hh DMA roiardlkra. Rum at ttp to 3Mh« without teiMrauns
MRUY or tnlermpis. Ma» ■* ovtfcmel 00 boon* DAT for uu with CPU cards
wttfcot* a OAT. 1 34*. ttt*. U2K or IM byte per card. Fkeld uptradahio.
Oetkmal ooaflfwratlMi *llow» 4M eyie addrei* reecb tuilhf memory board DAT*
« about CPU cHaqge* or cabfci. 1 year Ibnied warranty.
TDNBO virtual dlik lofiware and memory dlilmitki supplied with the »ntem.
Prvpild: 256K:$695. 12SK:S545, 512K:S795, 1024K:$U95
OotneMlc ihlpplni and handling 110.00. Usen manual: J 1 5,00, tppltcabta toward
*r««m purchase. C**hi»r» ckark. COO. paraonat cnacka nun clear before
sblp*i«at. Fla. raaidaiB* add S%» ieJe» tax. Shipped atoet 10 90 day*. Dealer eod
eaarXfty dlacant available.
COMPUTER EXCELLENCE INC.
P.O. BOX 8442
CORAL SPRINGS, FL 33065
1305) 752-832)
Available
Assembled
and Tested
compact
Flexible
6809
Computer
The new $7-2900 syslem - a complete 6*K smaJl business or hoobf 1*1 eotnpuiet
is only one 01 iia many possible configurations Among He lealuiea are
« Small enough to hold m your hand 1 {Eurocard sue 3 9" x 6 Tl
• Two board system for greater versaliMy than single board computers
• CPU Bpard * powerful 68098 processor, 16K or 64K RAM. 2K UK EPROm 2
RS232 sen at poits wan software programmable baud rates, 16 bn
couniein*me# Run Ihe CPU board all by 1 1 Self or plug your own custom board or
our FOC board inlo the expansion connector
• FDC Board - Ooubre SKSed/doubiedensily I loppy o*o* controller «ith
adiusimeoi tree d^gual dela Separator end write ptecompensation 2 8 on
Q*t*\\9i pons. 2 t8 bit eounte /limers. ptololypmg area
• Available as Oere PC boards or fully eeeewtbleel and taated boards All have
solder mask bolh sides plus sHdscreaned componeni overlay
• OS-9 for only $49?
Well, noi ouUo Bui thai t atl you pay lor oul OS 9 Conversion Package whrcft
tela you use Ihe tow cost Radio Shack CoCo vsrsicx* ot OS 9 on ou; ST 2900
system Save $131 of I the suggested list price ol 06>9i Ho provremmlnaj La
inwolw+d. Supports CoCoOS0 and atandard OS 9 forma I disks
• CPU bare board ptu* EPROM S*5 FiexCbrrverSion Package $29
FDC bare board 138 OS* Conversion package US
CPU ♦ FDC board set eaaembied and tested S329
• Add SS shippings andJing y% 10 Overseas) These prices aie mUS tunda Cana
dmn orders, call or write for prices Terms money order, cerilliod check, VISA
Sll*. ta *I»jhm<t^» »l »#, ti-H »■ » r iliMTi«4 ...*»..it*nl. 0»» m l,aOfu>»Ol W. lv .«iti
Wnle lo< rree brochure snd
complete price l«st
(o04)255-M86 i4*pmPSl)
T XC<HNOL<OOIC < >
2261 E, 1 1 lh Ave. Vancouver. B.C., Canada V5N 1Z7
SOFTWARE DEVELOPERS!
YOU'VE JUST BEEN CJVEN THE WEST REASON YKT
TO GET OUR 68000/ UNIX* Dr/.VELOE'MENT SYSTKM
THE VAR/68K* SERIES
vk <&xs7ao n jh rexr &umot7J W.ooo.
^A Inditdctk Tcnntnal, 20 Mb hart) dl«k.
^J2K KAM. 8 poma attd H«orjUiS*
VK aiSHTTS (Ui»l pilcr EiOiWJ I 86.8Q0.
lnrlckJr*. all of ahmr. pl«» 20 P4b
lapr 9M«nu7VT
;w *t*fHlt* tttr nimittnttir hr T|iuiJrPJ«T/ m v lb /%'
Isinia 64jaaJ haa been de*Mbilnft\ <WHflpn « and rrwu»ulac(ufine;
mk*KanvnpM irra baarO on thr Motixtaa lamtly of pnitraanra (or
Otr paaJ %jx year*. The VAK/6MK la ihe irtoai rwrni addition io our
family of mulck uarr cvmpuicrs.
Due lo rr»f rxirrmrty lew p^av* i>r<^ie
qOf i-d. w*r con Only ocrrpt nuh or C CX/X
orioi, ojwT i»^ ^u*r itmir fwrrrioara to on*
pwr a*mom*& T»U» It a UmfU* Jk»»r ojkr
qffrtrtptm Jut v u rms
to ow7Ai» nwt vAjt/ee*
at ruse lost esncsa\ cohthcd
SHOW SIGNAl
31 .L»t \ IA i < K HAn
WTST1AIX V1ULACZLCA9>3S3
m«im«iMo T«a^ eio 49i a»6
'66' Micro Journal
July 85
53
GOOD NEWS!
V /A
'/
fcSta
CORPORATION
fr/7 If. Virginia St,
\1ihvuuhe<\ H7 5,TJ(W
(i I $) J7fi-:>9;17
C
for the
6809
ms NEVER
BETTER!
INTROL-C/6809,Version1.5
Introls highly acclaimed 6809 C
compilers and cross-compilers are now
more powerful than ever!
We've incorporated a totally new 6809
Relocating Assembler Linker and Loader.
Initializer support has been added, leaving
only bitfield-type structure members and
doubles lacking from a 100% full K&R
implementation. The Runtime Library has
been expanded and the Library Manager is
even more versatile and convenient to use.
Best of all, compiled code is just as
compact and fast-executing as ever - and
even a bit more so! A compatible macro
assembler, as well as source for the full
Runtime Library, are available as extra-cost
options.
Resident compilers are available under
Uniflex, Flex and OS9.
Cross-compilers are available for PDP-
11/UNIX and IBM PC/PC DOS hosts.
Trademarks:
Introl-C, Introl Corporation
Flex and Uniflex, Technical Systems Consultants
OS9. Microware Systems
PDP-11. Digital Equipment Corp.
UNIX, Bell Laboratories
IBM PC, International Business Machines
For further information, please call or write.
54
July 85
'68' Micro Journal
O0KPILR& EVALUATION SERVICES
By: Son Anderson
The S.E. HEDIA Division of Computer
Publlsblbg Inc.,
Is offering the following SUBSCRIBER
SERVICE:
COMFILIA CCMT AllSOi
BWAUJiXlOl IKFQtT
Due co Che constant and rapid updating and
enhancement of numerous coapllero, and Che
dlfferenc utility, appeal, apeed, level of
communication, memory usage, etc., of dlfferenc
compilers. Che following service a are now being
offered wlch periodic updates.
This service, wlch updaces, will allow you who are
wary or confused by Che varloua clalns of compiler
vendors, an opportunity co review comparisons,
conenta, benchmarka, etc., concerning Che many
dlfferenc compilers on the aarkec, for Che 6909
microcomputer. Thus che aavlogs could far off sec
Che saail cose of this service.
Hany have purchased compilers and Chen discovered
Chac Che particular coapller purchased either is
hoc Che moat efficient for their purposes or does
noc contain features neceasary for Chelr
application. Thus the added expenae of
purchasing additional coapller(s) or not being
able to fully utilize the advaotages of high level
language compilers becoaea too expeoalve.
The following COMPILERS are reviewed initially.
■ore will be reviewed, coapared and beochaarked
as they becoae available Co the author:
PASCAL
GSPL WHIMSICAL PL/9
Initial Subscription - $ 39.95
(includes 1 year updates)
Updates for 1 year - $ 14.50
S.B. HEDIA - C.F.I.
5900 Caasaodra Saltb Ed.
Bluon, Tn. 37343
(615) 842-4601
OS-9™ SOFTWARE
SDISK— Standard disk driver module allows
the use of 35, 40, or 80 track double sided
drives with COCO OS-9 plus you can
read/write/format the OS-9 formats used by
other OS-9 systems, $29.95
SDISK + BOOTFIX— As above plus boot
directly from a double sided diskette $35.95
FILTER KIT #1— Eleven OS-9 utilities for
"wild card" directory lists, copies, moves,
deletes, sorts, etc. Now includes disk sector
edit utility also. $29.95 ($31.95)
FILTER KIT #2— Macgen command macro
generator builds new commands by com-
bining old ones with parameter substitution,
10 other utilities. $29.95 ($31.95)
HACKER'S KIT #1 — Disassembler and
related utilities allow disassembly from
memory, file. $24.95 ($26.95)
PC-XFER UTILITIES —Utilities to read/write
and format MS-DOS™ diskettes on CoCo
under OS 9. Also transfer files between RS
disk basic and OS-9 (requires sdisk). $45.00
SS-50 USERS: Half price closeout of 256K
dynamic ram boards, making way for new
Megabyte design.
BOLD prices are CoCo OS-9 format disk, other
formats (In parenthesis) specify format and OS-9
level. All orders piepaid or COD, VISA and Master-
Card accepted. Add $1.50 S&H on prepaid, COD
actual charges added.
P.P. Johnson, 7655 S.W. Cedarcrest St.
Portland, OR 97223 (503) 244*8152
<For best service call between 9 11 AM Pacific Time)
OS-9 Is * IrwMffurt 01 Mlcroware *KJ Mototofe Inc.
MS-DOS * « tract**** <jt MicraoM Inc.
Big Systems + Super Speed
UniFLEX- Power and Sp««d
(SP—di approaching *At40tSK b+cau*a
at TSC intotnai buttttng twctmtqttl)
Available for UniFLEX*
Utilities Pickapt I 66000 Cms Assembler
tURfUmii
ELEKTRA* Quality -
Maintrama Expandability
Up lo I Mbyte d RAM UliKTRA'- Smart Cirdl
Up la 84 Mbyte DMA Wlnchumtt
Removable Cartridfle DMA Winchesters
Riitonably Priced — Multiuser
Burt on our CPU 6/9 end Super Floppy Controller
Met to many ol you Iteve already purcluiid.
Write or phone for current pricing
AAA Chicago Computer Cantar
120 Cheatnut Lane — Wheeling, IL 60090
(312)459-0450
Tacfinkai CMiujff«ffai ******* me+t w—kit*r» from 4 P*M to § P*t CST
Hi H UA Ctouffi Cm*** Cm* f L 1 1 -i » 1 r mm* k ¥ T Kfiuui Stiihm C*mdu*l IK umf L U m ■ t tQ ititrM iriinuri ¥ ItchmcD S T m« Cmuitiiti toe
Utllltlis Package II
Basic
Entonctd Print Spooler
Bask Prtcompllor
Tlmo sharing
Cobol
acemtiHino package
Forlrjfl 77
FLAT for UniFLEX ■
Pascal
|Run all your old soltwarel
Relocating Assembler/
Linking Loidef
Sofl/ Merge
Tact Proctuor
66' Micro Journal
July '85
55
THE 6809 "UNIBOARD"™
SINGLE BOARD COMPUTER KIT
PERFECT FOR COLLEGES, OEM S, INDUSTRIAL
AND SCIENTIFIC USES!
64K RAM! DOUBLE DENSITY
FLOPPY DISK CONTROLLER!
BLANK PC BOARD
$ 99
95
WITH PALS, AND
TWO EPROMS.
FOR 5-1/4 OR 8 INCH
SOURCE DISKETTE
ADD $10.
$219 00
COMPLETE KIT!
FULLY SOCKETED.
PRICE
CUT!!
> (ft
< uj
§ UJ
85
§1
IS
H >■
0) it
S <
=1
52
<s
THE COMPACTA UNIBOARD": Through special arrangement with COMPACTA INC., we are
proud to have been selected the exclusive U.S. Mfg. of their new 6809 UNIBOARD " COMPUTER
KIT. Many software professionals feel that the 6809 features probably the most powerful
instruction set available today on ANY 8 bit micro. Now, at last, ail of that immense computing
power is available at a truly unbelievably low price.
FEATURES:
* 64K RAM using 4116 RAMS.
* 6809E Motorola CPU.
* Double Density Floppy Disk Controller
tor either 5-1/4 or 8 inch drives. Uses WD1793.
* On board 80 x 24 video for a low cost console.
Uses 2716 Char. Gen. Programmable Formats.
Uses 6845 CRT Controller
* ASCII keyboard parallel input interface. (6522)
* Serial I/O (6551) for RS232C or 20 MA loop.
* Centronics compatible parallel printer interface.
YOUR CHOICE OF POPULAR
DISK OPERATING SYSTEMS:
FLEX" from TSC t»e
OS9' M from Microware $199
Specify 5-1/4 or 8 Inch
PC BOARD IS
DOUBLE SIDED, PLATED THRU
SOLDER MASKED. 11 x 11-1/2 IN.
(6522)
* Buss expansion interface with DMA channel.
(6844)
* Dual timer for real time clock application.
* Powerful on board system monitor (2732).
Features commands such as Go To, Alter, Fill, Move, Display, or Test Memory. Also Read
and Write Sectors. Boot Normal, Unknown, and General Flex™.
Digital Research Computers
(OF TEXAS}
P.O. SOX 461565 . GARLAND. TEXAS 75046 . (214) 236-2309
TERMS: Shipments will be made approximately 3 to € weeks after we
receive your order VISA MC. cash accepted Add $4 00 shipping
USA AND CANADA ONLY
56
July '85
68' Micro Journal
DISKETTES AND 680X SOFTWARE
SUPER SLEUTH DISASSEMBLER EACH S99-FLEX, S101-OS-9, S100-UNIFLEX
inta**€llvalv 9»»«rttM acurca on di»* with I aba* a, trtclufta* *raf. lata) datinll on binary flla adding. «tC
%omc\tv 8800,^2^.5.6.9/8502 varaion or 2-60^8080^5 varaion
OS-8 and UNIPLCX vara*ona alio proem* FLEX obiacl Ma lormala
OBJECT ONLY vartiOnr EACH S50-FLEX & 0S-9. S49-COCO DOS
COCO DOS awailabia In 8800.1.2.1.5.9,9/6502 varaton only
CROSS-ASSEMBLERS EACH $50~FLEX/UNIFLEX/OS-9, ANY 3 $100, ALL $200
•pacify lor 1KU. 6SO*. 680*. 2-60, 8049/51. 8085. 60000
iroa. modular, fraa-atandtng crp*»-a»»ambiar», wrtttan In C
8-bU aourci IntfudatJ only wJtft all croat-ftfcMmblara (for ¥200)
DEBUGGING SIMULATORS EACH S75-FLEX, S100-OS-9, S80-UNIFLEX
• pacify 6800/1. 114)6608. 8502. 6809 QS-*. 2-80 FLEX
OBJECT OMLV varawftft EACH SSiMXCO FLEX & COCO OS-9
6502 TO 6809 ASSEMBLER TRANSLATOR
iranatata* f»S0? program* lo 6809. noting tnaucl eonvavatona
6800 TO 6809 & 6809 PIC TRANSLATORS
tranalata* 8800 progrtma lo 6809, 6809 program* lo PIC
FULL-SCREEN FLEX AND UNIFLEX TSC XBASIC PROGRAMS FOR 6809
I with complatt curftOr control)
D15PLAV OENErUTOrVOOCUMENTOR «0 w/tourca, $25 wilhoul
MAJUNG LIST SYSTEM $100 w/tourea. $50 wilhoul
INVENTORY WITH MRP $100 w/aourca. $50 wilhoul
TABULA RASA SPREADSHEET $100 w/aourca, $50 wilhoul
DISK AND XBASIC UTILITY PROGRAM LIBRARY S50-FLEX & UNIFLEX
•dit aactora, aori diraciory, milninn maalar catalog, do disk aorta. araf 8A5IC. ...
CMODEM PROGRAM S100-FLEX & OS-9 & UNIFLEX, OBJECT-ONLY EACH $50
prowioaa manv-drrwan Tal«Communic*T»ana facllifiaa. with terminal mod*, up/down load. MODEM? protocol, ale
5.25" SOFT-SECTORED DISKS EACH 10-PACK $13~SSSD/SSDD/DSDD S20-DSQD
Amarfean-mada, axcaliant ouaPity, with lackal* and hvb ringa
SS-50C 256K 1.5MHZ MEMORY BOARDS BLANK $80 A8.T $350
S75-FLEX, S85-OS-9, $80-UN»FLEX
$50-FLEX f S75-OS-9, $60-UNIFLEX
with instruction manual acnamatics, and dalay Imi, all parla raadily avaiJabta
Moat program* in aourea on ditt tpoeilV eompuiar. dia* aJta oParaiing aVatam
Coniaci CSC tor foil catalog and <*■■!■» information,
25% diacovnt tot muilipla purchaau of aama program on iimi ordar
For VISA and MASTER CARD, giva account, axp data, phoni US funda only
Add GA aalaa tan Ut you ara in GA) and 5V; atnpptncj
(UNftFLCX iradamark Tachnicai Svatama Conauitania. OS-9 tradamark Mierowara
Computer Systems Consultants, Inc.
1454 Latta Lane. Conyers, GA 30207
Telephone Number 404-483-1717/4570
SOFTWARE..
HARDCORE
tFORTH"
from TALBOT MICROSYSTEMS
NEW SYSTEMS FOR
6301 6801, 6809, and 68000
•• FORTH PROGRAMMING TOOLS from the 68XX&X "
•* FORTH specialists —gel the best!! ••
NOW AVAILABLE — A variety of om and disk FORTH systems to
run on and'or do TARGET COMPILATION for
6800. 6301 6601 , 6609. 66000, 6060. Z60
Write or call for information on a special system to fit your require-
ment
Standard systems available for these hardware —
EPSON HX-20 rom system and target compiler
6609 rom systems for SS-50. EXORCISER STD. ETC
COLOR COMPUTER
6800 6809 FLEX or EXORCISER disk systems
68000 rom based systems
68000 CP M-68K disk systems. MODEL II 12, 1 6
tFORTH is a refined version of FORTH Interest Group standard
FORTH, faster than FIG-FORTH, FORTH is both a compiler and
an interpreter. It executes orders of magnitudes faster than inter*
prelive BASIC MORE IMPORTANT. CODE DEVELOPMENT
AND TESTING Is much, much laster than complied languages
such as PASCAL and C If Software DEVELOPMENT COSTS are
an important concern for you, you need FORTH?
firmFORTH ■ is for the programmer who needs to squeeze the
most into roms. It is a professional programmer s tool for compacl
rommable code for controller applications
- IFOflTH ar«C armPOWTH w irad»m**t<s of ^^fbo% M<n*y*vw»
* FlEX»atfar*vna/t of TaeNrcjy Salami Cona**um* Inc
» CP M-68K « tradvmart o» 0*0**1 R**«*c* tnc
--. > tFORTH SYSTEMS - -»
For all FLEX systems: GIMIX. SWTP, SSB. or EXORcisor Specify
5 or 8 inch diskette, hardware type, and 6600 or 6609
'* tFORTH — extended fig FORTH (1 disk) $100 ($1 5)
with fig line editor,
•• tFORTH + — more! (3 5' o 2 8" disks) $250 ($25)
adds screen editor, assembler, extended data types, utilities,
?ames. and debugging aids
RS-80 COLORFORTH available from The Micro Works
" firm FORTH — 6809 only $350 ($10)
For target compilations to rommable code
Automatically deletes unused code Includes HOST system
source and target nucleus source. No royalty on targets Re-
quires but does not include tFORTH +-
" FORTH PROGRAMMING AIDS — elaborate decompiler $150
•" tFORTH for HX-20, in 16K roms for expansion unit or replace
BASIC $170
•• IFORTH 66K for CP M-66K 8" disk system $290
Makes Model 16 a super software development system
" Nautilus Systems Cross Compiler
— Requires: tFORTH ♦ HOST + at least one TARGET
— HOST system code (6809 or 68000) $200
— TARGFf sou ce code 6800-$200, 6301 6801— $200
same plus HX-20 extensions— $300
6809— $300. 8080 Z60 -$200. 68000- $350
Manuals available separately — pnee m { )
Add $6 system tor shipping, $15 for forei n air
TALBOT MICROSYSTEMS 1927 Curtis Ave., Redondo Beach, CA 90278 (213) 376 9941
68' Micro Journal
JulV 85
57
WINDRUSH MICRO SYSTEMS
UPROM II
■R06RAMS ind WER1?IES: U»«,
t2^o», 12716, T2si6, i?ru/??;2A,
RC166764/6, l*74*/276**, T2564,
]2nz8/2n2aA, and i?7M6.
1-tntel, T ■??■», purtotorole.
WO PEBSQUtLlTr ttfOuLEI tEOUlREPf
TBt-eOLT EPBOllS MH WOl SMPPOBTIB
INTEL 'a Intellgent Progressing
fta) laptawanted for Intel
2?6L, 27126 and 2tt*6 dtvicti.
lnlellloant programing rMKd
(h* evarage cXPji e— .Ing Kb* of t
27AA f rom 7 alnutea lo 1 e1«ute
IS aecood* (under Fct*> wH*
greatly 1esrov*6 reLlabilUy.
Fuiiv eneioted pod «-Uh 5* of
Hi! ribbon cable for connection
lo (he IOM cOayuter NC6521 Pit
interface boirfl.
RC6809 toUaare for fLEI end OS?
(Level 1 or 2, Venton 1.2).
BlKART BIS* FILE offtel loader
lUPOlled -ith rUl< B»OS «n«1 059.
Mno or > ran lofteare proaldti me following ficfl Hiets
•. flu, ....
b. MOVE .........
c. HH> . ♦ .
c. FIR* .....
e. EX4«I*E/C»ftKE
1. etc ..........
g. COM .........
h. yEBIFT .......
1. PROG Km ......
J. SELECl
k. EXTEt
L RETURN .......
I. EXECUTE ......
., « «alectrd art* ot I** buffer *1th a nEx tha*.
►. block* of dale.
. the bulfer In Mx and ASCII.
- • firing of byte* In the buffer.
• Cht content! ef tf»e bufler,
♦ <he<l»u* a lelected area o< tat buffer.
. a lelected area ol «n IP* 0*4 Into the buffer.
>. a lelected arta of an EPBO". against the bwffar,
.. a aetected araa of an ErHION »ith data in thr bufter.
, . a twu EPton type (raiurA to typei aenu).
. ttia *r»t*e aonltor.
. to the operating trite*.
. *m 60S utility (only In FlER mn6 0S9 *«r|tgnt) .
/LEI AW 0S9 VEHSIOM ȴ*lLA8Li t*Q* 6t*U. SSQ/HfrOS COWUCT US OlP-ECT.
PL/9
i friendly Inler-ettlve fnvlr u iwaaiit where you hlrt IKSTART acceea lo (ha
Editor, ma CoepHer, and the Traca-fcrta^gar, uMch, e»*a*o*( o(f*er
(king*, can tingle ate? tae prograa • SOtetCE tin* at a l*ee. tpu All*
have direct eccett to *«y fLEI utility and your eyitaa aonltor.
■ 3'V* peg* annuel orgenitad aft a tutorial ■ *!* plant y of n**4U«.
• fa»l SIfa&LE PASS coaputr predweaa 6k of COwACt and iasi 6609 oachioo
codr ovtpvt p#r alnut* H ,tth no run-i \— ovarnaadt or - TTcfrnt feas.
■ Fully coopatibla with tSC tt»l adltor 1or««t ink filai.
• Siynad and unngntd BY IE) «r>d IftUURS, J?-61t flaatlno paint MALI.
• VtttO'i ttinqlt 0i**riiiori «rny»> and poVntart ara twttporttd.
« PlalhaaatUal airpraitlor^a; (4>, <->, (a), </) J aodului (\)^ napadon 1-)
» Eaprattlon awaluttortt <»J, <0>, <<), <>)^ <>")^ <<■)
» fit QParator^; CA«i») 4 <0#>, (Eoa/IOtJ/ (NOT), (SHIFT), ISMAP)
• L0«1<4it Oparatorv: <.A«H)) # l.Qt), t.EOt/lO*)
« Control ltt(rar<tl: 2F..TME"..ELS( # tr*.<ASEt..CASE*-.ELSEr BE6IM..EN0,
MMlLE.. 4 vEPEAt^.uajrtL. »l*l*1. .FOREVER, CALL, Ji*P, REEURM, 6«CAA, GOTO.
• oi net accatt to <acca>, IACCB), <accdi, <xre«>, (CCft) and (STACK).
• fUU-t iupparta l«a MC6609 RESET, Nn). F1R9, IN, Stfl, S«t2, and Stttl
vactort. terlilng a aalf-t t«*t lop {(re* pewtr-v©) prograa tliat uifi *ht,
or AXL, Of tna AC66T79 Inttrruptl H an aOaoltita «a*p!
• Machina coda a*y ba aoboddad In tha QrWm via tha 'tEJi* atatoavnt. TMi
anablaa r*« to «oda CrltHll rowtlnaa In aiaaaely lanowaga and raftad tnaa
1n in* PL/9 prograa Ctv* 'NACf for datallO,
• Procadurat aay ba patftad and m»r ratum siarlablri. TMi aakii tha*
Functlont which otAava aa thouph thty vtr* u\ Intagrat part of PL/9,
• Savaral lully docuoanUd library procadura oodula* *n vjppllad: 10SLAS,
SlflO, KARblO. HEI10, ELCRIO, SC1PACK, STRSUBS* BA T«!NG, and REALCQM.
«... THIS 15 THE «051 EflKlENT CQWPtLEB I H>V£ TO
froa Ron Andtrtona fLEI lH«r «ot«l COluan In '6|,
W TO MTE.*
ttttd iia i«r avraT
MACE/XMACE/ASM05
til of thai* eroducti ftatura a highly product 1*e anvlronaant whtra t^a
adltor and lha aactdiLtr railda In aaocry togalhtr. Corn* mm tha dayi of
ttdlbi d<it load and aava oparallona mhHa you *f debugging yew coda.
« Fn«ndty Intar-actWa anylromaant whara r^* have in«tant accaaa to (ha
Editor and tha A»»caftlar, fLEI wtllltiat and your ayttaa aonltor.
« MCE can alio Produca ASnPtOCi (uEN *tat**)tfi|i» for Pi/9 ulth tha
aaiaably languaga aourca paiaad to tha output m% coaaanti.
» JdUCE la a troaa aaaaablar for Ifia 6*00/1/2/3/1 and lupports tha aittnoad
■anaonlci of t*a 6305.
• ASItK U * crotl Ml fob l tr tor (h* btOl.
D-BUG
LOOa-tNS for a »l«gu atap tracar and alni 1n-l Ina diaaaaaatiar lhat 1b taiy
to wtatt LooL no furtlvar, you hava lound 1t. Th1t packagt it Idaal for
(hoaa aaall aibeably lanpuaga prograa Oabuggiog ttisloni. 0-BJC o«uplot
lata Chan 6* <lnclud1ng 1t« tttck, and variable!) arid aty be loaded an r »heri
In mtmcry. A-ll you do la LOAD IT, Alfa IT and 60! (B0 col VPUi only).
McCOSH C
mil l» *i coapleta a 'C eoasiler a* fOu ^in find on any ooareting trata*
far tne 66X19. It la coevteteU tuapatlbla -itN \*lx VII and only led*
■OM-fleldt* <w(i1<« mrt of Hide prattle*! uia tn tn AH>1t uorld(>.
Productt *9ty efflcent at«a«bLy I'
towrca optionally Interleaved at Ci
tource output with tna *C*
• *utl1-1n QpTfalfvr *\ \\ ihgMf^ Objact coO* f r mbeut 111,
* Support i Iniarlaavad aitnbly language program.
' INCLUIES 111 dun aaiaieMer, The TSC relocating eaaeabler 1a only ragulred
if you want to atrteratt rovr our libraries
■ tha pre-procattor, compiles-, Opt1«*1<e/-, ataeabler and loader aU run
indeoendantly or under the ' CC* tMtutWt. *CC' aakat coapl ling a prograa
to axe^utabta object ai tlaptt a* tyel'tg In *CC,H€LL0.C <RETLJRM> 4 .
IEEE -488
a UFPOATl ALL *«IKtPAL KO&Ef 0* T«t ICEl*L» ( 1975/6 » BUS IPtCl* ICAFIMi
talker
Llttener
Sy«t«« Controller
Serial POU
raraliai Poll
' 6re\a> Erlgger
- Slnaia or Dual Pvtaary ftdo>eaa
- laconoary Addrati
- Tatfc only tlaten only
- Fully docuaectted ^Ith t coa*>ltte reprint of the KILOBAUD erdcle on the
1ECC Put and t*e Motorola oubHcatlon 'Catling aboard tha IEEE Bui 1 .
« Lou level e»a*«bly language drlvtrt uilltble for 6B0D, 6801, 600^, 6B03 #
6B0fl and 6009 are tuoolled In (he fore of Hatingi. a complete back to
b*C4 tait Prograa la alio tuppilad tn tha Tor* of a Uttlng. Iheie
drlveri ftave b««n e<t*nal^e(.y tailed and ere GIUMNTEED to work,
• Single S-30 board <4, fl or 16 addreaaei per per(>. Fully lOcLatad, dlld
olated tM» conn*c(ori and (EEC Interface table aaaeebly.
PRICES
6-6JM6 (6009 EL€I only) t »S-00
RACE (6009 ri£i only) t 75.00
xfUCE C4009 f\SX only) 1 96.00
AS4Q* (6009 FLEX only) % 98.00
PL/9 (6009 fLEI only) 1190.00
»t* (6809 FLEX only) 6295.00
IEEI-400 vicr, (EEE-L66 cable aaarably S296.00
0PROH-11/U viih one vertlon of tottaare (no cable or (near fact) .. » 595. 00
L#tfjM-lJJc at above but coaplete kMh cable and S-J0 Interface ....9)43.00
CABLE 5' lutic«n-flat 50 va) cable with JBC cov«ectort \ 35.00
•~?iU IHT SS-30 1nterta<e for UPRCJPrll S130.00
EXOR IMT Motorola EiflPbut (EXOftclaar) Interlace for UPftOft-l I ... 9195.00
uPXON SFT sofiuere driven for 2nd operating Dttea.
Specify flex or OS9 and dlak tlitt S 35.00
UPfiQM SIC Atirably Language aourca Ci on tact ut direct*
ALL Pi ICES [MC^i vM l|t Hit F J H 1 t I
TtrtJtl CW0. Pay-ant by (nfl Money Order. VttA or lUllfR-KABO Itlt eccapted,
* AlFOHP 4 *SSOC\ATW&
fUl (1bj> i| a trade air > D f Technical SyllOM Con lull ant a, QJ*9 (la) 1* a
Ifadtte'fc dl iHcrpuart Irtttoi Corporation, MMt <t»> and ElOtclttr <to)
era tradfaarhf ot Pblarola In torpor • t ed.
WORSTEAD LABORATORIES, NORTH WALSHAM,
NORFOLK, ENGLAND. NR26 95 A.
TEL : 44 (692) 404086
TLX: 975548 WMtCRO 6
58
July '85
'66' Micro Journal
r
68'
MICRO
JOURNM.
Til ft»tf All 6009. B8000 Lmmpmiw (Difaitoi I
* UlM* B809, 68000 Mtviil
• tko ill tki itkn tabued I
MAGAZINE COMPARISON
(2 years)
Monthly Averages
6800 Articles TOTAL
KB BYTE CC DOBBS PAGES
7,6 6.4 2.7 2.2 19.1 ea. mo.
Average cost for all four each month: $6.53
(Based on advertised 1-year subscription price)
68 cost per month $2.04
That's Right! Much, Much More
for About
1/3 the Cost!
OK, PLEASE ENTER MY SUBSCRIPTION
Bill My; Master Charge Q — VISA Q
Card £ 6xp. Date
For □ 1-Year □ 2 Years □ 3 Years
Enclosed: $_
Name .
Street
City —
State
.Zip.
My Computer Is:
Subscription Rates
(Effective March 3, 1985)
U.S.A.: 1 Year $24.50, 2 Years 142*50, 3 Years $64*50
♦ Foreign Surface: Add $12*00 per Year to USA Price*
* Foreign Airmail: Add $44.00 per Year to USA Price.
♦ Canada & Mexico: Add $ 9.50 per Year to USA Price*
* U.S. Orrency Cash or Check Drawn on a USA Bank IB
68 Micro Journal
5900 CatMndm Smith Rd.
Hlxaon, TN 37343
wcuoa
(615)842-4600
TELEX 551
STAR-DOS LEVEL I
Whenever a new DOS is introduced, there's
always the problem of developing software to
work with it. So we did il the opposite way — we
analyzed the requirements of software that
already exists and developed a DOS thai mei
them... and exceeded theml The result is STAR-
DOS Level I, a new DOS for 6809 systems, ideal
for single user industrial, control, and advanced
hobbyist applications. This includes SS50
systems and single board computers from a
variety of vendors.
Level J is compatible with most current 6809
hardware and software. On the hardware side, it
allows up to ten floppy or Winchester drives with
appropriate controllers. On the software side, it
runs existing 6809 software from all the major
6809 software suppliers, including TSC, Star-
Kits, Introl, and others.
Write or call (or more information. STAR
KITS Software Systems Corporation. P.O. Box
209, Ml- Kisco N.Y. 10549 (914) 2410287.
ks
TAR-KITS"
NCERSOH OJn/TO? CONSULTANTS
&
Assoc fates
Ron Anderson, respected author and columnist
for 68 MICRO JOURNAL announces the Anderson
Coaputer Consultants A Associates, a con-
sultfng firm dealing primarily Jn 68XX(X)
software design. Our wide experience In
designing 6809 based control systems for
machine tools Is now available on a
consultation basis.
Our experience Includes programming
machine control functions, signal analysis,
multi-axis servo control (CNC) and general
software design and development. We have
extensive experience In Instrumentation and
analysis of specialized software. We support
all popular languages pertaining to the 6809
and other 68XX(X) processors.
If you are a manufacturer of a control or
measuring package that you believe could
benefit from efficient software, write or cail
Ron Anderson. The fact that any calculation
you can do with pencil and paper, can be done
much better with a microcomputer . We will be
happy to review your problem and offer a
modern, state-of-the-art microcomputer
solution. We can do the entire job or work
with your software or hardware engineers -
Anderson Computer Consultants & Associates
3540 St ur bridge Court
Ann Arbor, HI 48105
'68' Micro Journal
July 85
59
our EPROM PROGRAMMER with the field.
All dmln tolro directly frcm mywf acturvr * » current «K«rci»i**9. Irftiari.
lnt«rf*ow, or fvrwuiity m**"!** «>y «l*o b» rwjuir»1 At fefciitlmal <Tj»t.
• Triple %olt«9*
unvn
• St^llid Id kit
for*
INTERFACE
S30
INTELLIGENT
MO
PROGRAMS
?704*
2908
•
2706.
275*
•
2516
•
2716
•
2710-
2532
•
2732
•
2732A
•
2 $64
•
2764
•
MM
•
27126
•
2616
68764
8746
8740
TOTAL
11
PRICE
6125
| a | a J c | o 1
PAR
pah
SEP
530
sen
SER
NO
NO
VES
NO
YES
ves
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
•
3
12
6
11
11
11
S4S<
6160
5 2AQ
6375
6480
S575
OWN OHI1 Ftiljr — ■. fl2V (*r«cx«)Uy mAjI* fur 2508' 2736. 241*, «rt
2716 lr*U«te<1. %*clfY CSV* 41 nk -U*. <**) tv^ati™? v/»uh CT3C* f12» or
SS8 • DOS) WTton orxfcrrb^. Hacual «Uy. 510? r»f\»«ltf>l» with ICTWM pmtwwo.
UNITEK - P.O. Box 671 - Emporia, VA 23847
77*fP SOFTWARE ANNOUNCES
A Popular FLEX Database Program,
DAT AM AN
f» being Re~relea*edt
Si 95. 00
POWERFUL CAPABILITIES:
* Each field can contain up lo 126 characters, and each Md name
can contain up lo 29 characters.
• Field lypt?s can be alpha, numeric or monetary,
* DAT AM AN lets you produce vertical or horizontal reports oi
your database, or create customised tellers and forms to pull dala
Irom a database using DATAMAN files processed by the TSC
Text Processor
• DATAM AN allows you to l*ok up records quickly, to merge
unlike databases and to move records Irom one database into
another
♦ DATAMAN includes a Label Generator to produce mailing,
shipping or inventory labels
• To sort records based on the geographic, historical, name, or
monetary criteria you select. DATAMAN creates Sort Files which
can then be used with the TSC Sort Merge package
GIVE YOU MORE A BUTTIES:
Our Users put DATAMAN to work lor ifiem Jo do customer
mailings, past due notices, real estate listings, invoicing, sales
analysis, activity scheduling, inventories, employee records arxi
client profile reports.
Also included m this pack.igs? is DATARAND, th* extension
program to DATAM AN which enhances DATAM AN programs
DATAMAN <un» under TSC EM#*wkd [L.~ ltw ISC Su»» Meiy and T«ni
K 1 rtn«*%uri |H>P{i.inft drv .Jwi trt nn>r(wrnV<l " '■■ SoUfi ■ i. <*%r Iiht DAIAMAN ,»'«!
DA \ AM AND m *u ludrd on ilv ft* .im (fakt
ORDERING INFORMATION: TMP SOFTWARE
2631 E. DougU. • Wichita. H$ • 6721 1
OR CALL TOLL FREE: 1 800-255- MS2 E*t. 47
We accept VISA. MC. AM EX, money orders #»d check*.
NO ft TW SftnvtHm *>f— .V*** IV (MP POWER MAHACfR U» OS h «vtfMM nrd fhc
Or* Ond TSC lire f J4)A"n«*fc t ,4 Jrt htm.it! S±\te**r\ < ^Hm'f^i/k Jr*
68 f MICRO JOURNAL
Disk- 1 Fllesort, Minlcat, M1n1copy,
M1n1fms, **L1fet1me, **Poetry,
**Foodl1st, **D1et.
Disk- 2 D1sked1t W Inst.A fixes,
Prime, *Prmod, **Snoopy,
♦♦Football, **Hexpawn,**L1fet1roe
Disk- 3 Cbug09, Seel, Sec2, Find,
Table2, Intext, D1sk-exp,
♦Disk save.
Disk- 4 Mailing Program, *F1nddat,
♦Change, *Testd1sk.
DISK- 5 *DISKFIX 1, *DISKFIX 2,
**LETTER, **L0VESIGN, **BLACKJAK,
**B0WLING.
Disk- C **Purchase Order, Index (Disk
file 1ndx)
Disk- 7 Linking Loader, Rload, Karkness
Disk- 8 Crtest, Lanpher (May 82)
Disk- 9 Datecopy, D1skf1x9 (Aug 82)
Dlsk-IQ Home Accounting (July 82)
D1sk-ll Dissembler (June 84}
D1sk-12 Modem68 (May 84)
D1sk-13 Mn1tmf68, Testmf68, *Cleanup,
*Dskal1gn, Help
D1sk-14 *In1t, *Test, 'Terminal, *F1nd,
*D1sked1t, Init.LIb
D1sk-15 Modem9 ♦ Updates (Dec. 84
Gilchrist) to Modem9 (April 84
Comrno)
Dlak-16 Copy.Txt, Copy. Doc, Cat.Txt,
Cat. Doc , Date.Txt
Disk- 17 Match Utility, RATBAS (A Basic
Preprocessor) June 85
HOTS:
This is a reader service OMLT! No
Warranty Is offered or Implied, they are
as received by "68" Micro Journal, and
are for reader convenience ONLY (some
MAY include fixes or patches). Also 6800
and 6809 programs are mixed, as each is
fairly simple (mostly) to convert to the
other.
PRICE: 8" Disk $14.95 - 5 M Disk $12.95
68" Micro Journal
5900 Cassandra Smith Rd.
Hixson, Tn. 37343
(615)842-4600
♦ Indicates 6800
** Indicates BASIC SWTPC or TSC
6809 no Indicator.
MASTER CARD - VISA Accepted
Foreign — add 10S for Surface
or 201 for A1r! I
60
July 85
'68* Micro Journal
TRS-80+ MOO I. III. COCO. TI99/4a
TIMEX 1000. OSBORNE. offers
GOLD PLUG - 80
Eliminate disk reboots and data loss due to oxi-
dized oontacis at the card edge connectors.
GOLD PLUG 80 solders to the board edge con
neclor Use your existing cabJes. (if gokj plated)
GOLD PLUG 80 Mod I (6)
Keyt»afd/EI(modl)
Individual connectors
COCO Disk Module (2)
Ground tab extensions
Disk Drives (all R S )
Gokj Disk Cable 2 Drive
Four Drive Cable
GOLD PLUG 80 Mod HI (6)
Internal 2 Drive Cable
Mod III Expansion port
USA shipping $1 45
Foreign $7
/jf
S44.95
15.95
7.95
16.95
INCL
7 ,95
rfP
1 0. 9
-ree-
29.95
39.95
54.95
29.95
10.95
Can/Mex $4.
TEXAS5% TAX
Ask your favorite dealer or order direct
E.A.P. CO.
PO BOX 14
order roDAf . KELLER, TEXAS 76248
(817)498 4242 MC/VISA
♦ trademark Tandy Corp
for the CoCo
DISK SYSTEM
XPNDR2 S39.95 each or 2/S76
This proioiype card features a 40 pin
connector for projecis <oquirtr>g&r> on*
line disk system or ROM paks The
CoCo signals are brought out to wire-
wrap pins Special gold plated spring
dips provide reliable and noisefree
disk operatkcn plus solid support for
vertical mounting of thecontroller The
entire 4 3-7 Inch card is drilled for ICs
Assembled, tested and ready to run
XPNDR1 $19.95 each or 2/S36
A rugged 4 3*6 2 inch bare breadboard
that brings ihe CoCo signals out to
labeled pads Both XPNOR cards are
double-sided gtass/epoxy, have gokJ
plated edge connectors, thru-hole
pialing and are designed with heavy
power end ground buses They're
drilled for standard 3 and 6 inch
wide dual in-line wirewrap sockets:
with a t fnch grid on the outboard end
(or connectors.
SuperQulde $3.95 each
Here is a unique plastic insert that
aligns and supports printed circuit
cards in the CoCo cartridge port Don't
forget to ORDER ONE FOR YOUR
XPNOR CARDS,
Included with each XPNDR card
are 8 pages of APPLICATION
NOTES to help you learn about
chips and how to connect them to
your CoCo
To order or (or technical mfor ma-
lion call
(206} 762-6609
weekdays 6 a m, to noon
We pay shipping on prepaid orders.
Tor immediate shipment send
check, money order or the number
and expiration dale of your VISA or
MASTERCARD to
BOX 30807 SEATTLE, WA 98t03
nm
Computer Engineers
19535 NE GUSAN PORTLAND, OR 97230 (USA)
PHONE: (503) 666-1097 • TC UX: 910 390 5443 ULOVD I O
K BASIC is here
K BASIC Is O TSC XBASIC (XPC) compoilble COMPILER
for OS9 a FLEX. . . price $199
Here of lost is o compiler for Bfl&C 1ho1 will compile oil your
XBASIC programs. K-BASIC compiles TSCs XBASJC and XPC pro-
grams to mochine code. K-BASIC is ready now to save you
money and time by teochfng your computef to:
■ Think Faster » Conserve Memory • Be Friendlier
Coll (503) 666-1097 lor our CATALOG.
W« how many programs tor t+rtous software b«wlop*r»l
DO™
Micro BASIC tor OS9... $149
A structured mirco BASIC for general system control featuring
Parameter passing, 10 string voriobles. 26 numeric variables,
subroutines, nested foops. Interactive I/O. sequentiol files, and
time variables (tor applications execulkng in the background re
quired to execute procedures such os disk or file bockups,) In-
cludes the SEARCH and RESCUE UTILITIES 1 *, (For OS9 ONLY.)
SEARCH and RESCUE UTILITIES'
forOS9...$35
A super directoiy seorch utllily, Output moy be piped to the In-
cluded utilities to perform Rte: COPIED DELETES. MOVES. LISTING
(paginallon), and FILTERING. Some filtering utility programs ore
Included; of interest is the FILE DATE CHECKING uttlilies: YOUNGER
orvd DRAFT (Level 2), (for OS9 Level 1 and 2.)
PATCH™
Modem Communications for OS9.
$39
PATCH is o modem communiooflons program for OS9 featuring:
KEY MPCROS. ASG\) TEXT AND BJNAffy FILE WDOWN LOADING.
PRINTER COPV, and HELP MENUS, We use it several times each
day with our TELEX service. PATCH is convenient and easy to use.
Key rnocros may be pre-stored and loaded al any time.
CRASMB"
CROSS ASSEMBLER PACKAGE
for OS9 8l FLEX.., ail for $399
Motorola CPU's... $150
Intel CPU's.. ,$150. Others.., $150
CRASMB is Ihe highly acclaimed eras* assembler package for
OS9 and FLEX systems. It turns your 680Q computer into a de-
velopment stalion for ttiese target CPUs;
6800 6801 6804 6805 6809 6811 6502
7000 1802 8048 8051 8080 8085 Z8 Z80
(68000 16/32 brt cross assembler.,. $249)
CRASMB features: Macros. Conditionals. Long symbol names,
Symbol crass reference tables. Object code In 4 formats (OS9,
FLEX S-1-S9, INTEL HEX).
USA:
England:
Australia:
VISA, MC, COO. CHECKS, ACCEPTED
ILOVDI/0 1503 666 1097), $& M€OiA (000 336 6600)
Vtvemtry (0562 423429). Wlndnjth (0692 405*39)
2ochw Cofrvut^ (65 25 299). IC*lt SofTV*w» (06203 6741 1
Port* Radio Electronic* (344 9111)
K-8ASC DO, SEARCH and fflraOLf t/fc/TR
PATCH G9*W* and OU9^ KX> an cui ta >J*j fc3 oftlOVOVO
079 Ho - of Microuoa Fl£X a a "CftSC
'68' Mwro Journal
July 85
61
CO RIM
*
MODULES - BAKE CARDS - II tS - ASSEMBLED A TESTED
St ac labia Modul** EIT A AT
20 M°p POfBR SUPPLY v/fmn
v/Diak protect flij 350.00 400.00
DISK CABIUtT «/r«I«. % ca laa
laaa DBIVE3 200.00 250.00
MOTEEft BOASD, B SS-SOc, * 88-SDc
WV.I button 225,00 325,00
"Itii" Bare EIT AiT
IT3 - IHTEREUPT TIVBB
1, 10, 100 par aac. 19.93 29.95 59 95
PB4 - IHTELLIOEIfT POET BUFFER
Stasia board conput.59.es 114.95 139*95
DPIA - Out! PIA parallal port #
4 buf farad I/Oa 24. OS 69.95 89,93
XADB - Sstaadad Addraealag
BAUD |a&. PIA port 29.93 69.93 69.93
MBS - HOTBEE BOARD B8-S0c
w/BAOD fan. 64.93 149. 95 199.93
PlflB - 166E PBOM DISK
21. 2T64 EPROEs 39.93 79.93 109.93
FDAS - Flrsaara davalopaaat
2. 61 block* 39.93 64.93 114.93
XXPR - 2764 PROtt buraar adapt.
for 2716 BUttVEB 19.93
caiRRt Eay oard v/Cabioat
96 Bay oapacltlva 249.93
TAEAJT 12*\ 16 Kb* MONITOR OREEH 149.93
AMBER 139.93
4 MOODLE CABlfftT - uafialabad 130.00
POWER 80PPLT w/dlak protect 230.OO —
Color Computer
MOKOLIKK - 20 Mba «oaocbroa»
▼ ldao driver 13.00 20.00
CCSO PORT BUS a/pover aupply
5 S8-S0. 2 Cart 169.93 199.93
POEBB BOX 6 anitchad out lata
traaaiaat auppraaaioo 29.93 39.93
RS-232 3-avltcbad porta
for abOTa ADO ♦20.00 ♦23. 00
Write for FREE Catalog
A00 S3. 00 St* PER OROER
WIS. A00 S SALES TAX
11931 W. Bluemound Road
MILWAUKEE. WIS. S3226
(414)257-0300
68 f MICRO JOURNAL
ADVERTISERS INDEX
66' MICRO JOURNAL 99,60
AAA CHICAGO CLWi/IER ONER 55
AOIRN d>!Pl/IER SY3IB6 62
ANDERSON OHPUTCR amMANIS 59
C USfitS OttUP 52
OHPILER EVALUATION 23N1CES 55
OMVM &&1LE1CE 53
dMVIER PUBLiamC DC 5,6
dXPUIER SYSTOS QX«l/LTANI5, INC. ...57
QKDWIW IBC,0BC
DIGITAL RESEARCH OWPVJIERS 56
D.P. J0W4SQN 55
EAPOO 61
INIKOL CDKP 54
USKD IA> 61
mCTOttFE SYSTEMS OORP 1,4,14
PERIPHERAL ITDiNOLflGY 63
robotic MicRosrerae 61
SAKDIS immaciES 53
MKE SIGNAL fflOADCASTW; 53
scxrm east rauiA 31,32,33,34
SJJRUESI TEMUCAL FTOQXI5 INC. ...IPC
STAR-KITS 59
TALBOT MIQOSYSIM 57
THtfttUS DESIGN INC 53
TMP SQFNABE. 60
UNTEK 60
WESTCHESTER APPLIED BUSINESS SYSTEMS .63
VINKUSi KIOO SYSTEM LIMITED 58
This Index is provided ss a reader service. The
publisher does not assume any liability for
omissions or errors.
62
July 85
'66' Micro Journal
PT-69 SINGLE BOARD COMPUTER SYSTEM
OS-9 OR STAR-DOS NOW INCLUDED
■ 1 MHZ 6S09E Processor
• 2 RS232 Ports (8850)
- 2 8-blt Porta (682?)
• 56K RAM 2K/4K EPROM
• Tlme-of-Day Clock
■ 2797 Floppy Disk Controller
-PT69S2-40
Complete System with PT-69
Board, 2DS/0DSV40TR
Drives. Cabinet, Power Supply.
Your choice of OS-9 or STAR-DOS.
-PT-69S
Assembled & Tested Board with
Power Supply and Cabinet.
-PT-69A Assembled and Tested Board.
-Parallel Printer Interface with Cables
-OS-9Leve*1
-STAR- DOS Level 1
$99995
$ 99 95
$29595
$ 49 95
$200 00
$50.00
PERIPHERAL TECHNOLOGY
"Supplying Your Computer Needs Since 1978°
3760 Lower Roswell Road
Marietta, Georgia 30067
VISA/MASTERCARD/CHECK/COO 404/973-0042
XDMS
Data Management System
DISPLAY ]
/ input t> utilities rC/ output/
[ENTRY p^
ENTRVK
DMS
OUTPUT
fJL\
I inoMPTi/
1 /COMMAND
System Architecture
MC8TCHE8T
ER AppH»d Bu«ln«
Pott Qfflca 9ox 187
BrlArCliff Minor, K.T. 10310
Symtvirtm
XUH5 Damta* M*n*g«mT>t Bvmt»rr?
Thf HDHS Data Management Sy*t*rf* it available in trtf*a l*v*lt- Each
level include* the XDMS nudtu*. VHOEK utility And Sytfem Decuman rat ton
For level l(t> tDK5 tt an* nf the mait powirful tyttdffi* AvAllAbld for
*8<J0 computtrt and mij bt utrd far * Mid* varlaty o* Application*. XDMS
ummrm are rerjtatarad in out tf*t«t*t* to permit 0i*t nbution at product
jnnagncffflfnti and *ilnHHcm of uier upgrade* md muntanAnca rtquattt.
XDMS Laval I contlttt o, DEF1KE. UPDATE and REPORT facilities.
TM* level j» Intended as An "entry leva)" tyttam. And permit* antrjr APd
^•porting of dAlm on a "tabular' bittt« The DEPORT facility «upport*
ffCOrd and firld aelactlOrtr field mirgti iprhng t lln* calculation*,
column total* And report titling. Control tt via A Engli*n-hke language
which it upward compatible with level U. XDMS Laval 1 .... . »I29„93
XDMB L ajw a* 1 11
Laval II iddt to Laval I ttta powerful OEMERATE facility. Thit facility
cAn ba thought or" at a general file prpraaapr which can produce reporl*,
form* and form letter* at wall at flla output -IMch /nay ha *#-input to
the facility. GENERATE may be utad >r» complex proc»**mg Application*
and i% controlled Oy a Eogli*fi-U*» commanc: language «Mch encompatte*
lhat utad by Laval I. XDMS Laval II tla9.93
XDMS Litviil Til
Laval III include* a)) of laval II pint a mat of uteful OMS Utillhti,
Thin untitle* iff datifnad to Aid in th* development arte: maintenance
Of uier Application* and permit modification of XDMS tyvtem parameter*,
input and output of XDMS filet, ditPlay and modification of fUa fo/mat,
graphic display of nuitifricil data and othar function*. Laval HI n
intandad for advanced XDNfi uiiri, XDMS Laval 111 , . . A3**i95
XDM6 System Documentation only cttO. cradir toward purer,***). > .t 2a, *S
XACC Accounting Bw*m***>m
Tna XACC General Accounting System 1* designed for tmAll botinata
environment* of up to 10*000 account* and inventory Ham*. The tjrtttm
integrate* Accounting function* arid invanlory plut t ha Otntral ledger,
account* receivable and payable functiona normally aold aaparataly in
Othar *yat*mt. Faaturat jltr defined accounts, product* lor • •rvicafl,
transactions, invokingi * tc. Easily COnfigurad to moat *riv i renminti,
XACC Oanaral Accounting Syaiam ifleQulret XDMS, pr*f. Lv. Ul>, . t209.05
XACC Syati'm Oacumantatipn only r»$0. cradlt lo-ltd purchaaal. . .t 24.9?
WESTCHESTER AppUod Bualnoov ByatA/na
Pott OftlCa Box 167, Brlarcllff Manor, M.T. 10310
All aoftwac* li written In aacro/aaAeaiiUr and ruoa uodar 6S09 PLUt Q/$„
Taraat Chack, Money order* Via* or rUatarcharfa. Shlpaant llrat claaa.
Add fiN 42.50 (37. 50 roratgn Surface or $15.00 Foralfa Air). Hi Ra* add
aaLaa taa. Sp«ci«» i" or i",
Sal'aa: 1* I. MDLA, <*15) M3-4IQ0, Coo ut tat tons 9|4-94I-3S52 («vo«)
'68' Micro Journal
July '85
63
GIMIX STATE OF THE ART 6809 SYSTEMS FOR THE SERIOUS USER. s
GIMIX has 19MB or high performance
47MB Winchester Drive Systems and/or
Floppy Disk Drive Systems.
For the ultimate in performance, the Unique GMX 6809 CPUIII
using either OS-9-GMXHJ or UaiFLEX GMXID (available shoitly),
gives protection to the system and other users from crashes
caused by defective user programs, e.g. During piuyjuju
development, a programmer who crashes goes back to the
shell or the debugger, while the other users are not even
aware anything occurred.
Ihe intelligent serial I/O procesor boards signifi-
cantly reduce system overhead by handling rou-
tine I/O func-
tions, there-
by fieeing up
the host CPU for
running user
programs. This
speeds up system per-
formance and allows
multiple terminals to be
used at 19.2K baud.
9ASIC-09 and OS-9 *r* tnafemarts of MLoware Systems Corp. and MOTDfiOJA Inc
FLEX and IfoiRiX art vatawks <A lecftntaJ Systems Gorauroms. Inc
GIMIX GMOSt Q MX. ClASSY CHASSIS, am trademi/ta ri GIMIX, Inc
cimix
inc.
For the user who appreciates the need for a ■§
bus structured system using STATIC RAM 2
and powered by a ferro resonant constants
voltage transformer. g
GIMDC has single user systems that can run "
both FLEX and OS-9 or Multi user systems for
use with UniFLEX or OS-9.
GIMDC versions of OS9 and UniFLEX in-
clude maintenance and support by Micro-
ware (90 days) and TSC (1 yeoT). Mainte-
nance and suppoit after this period
are available at extra
cost.
(NOTE: this support and
maintenance is only
for use with approved
GIMIX hardware)
/ GIMIX 6809 systems g
w/ support live predominant ^
operating systems '
OS 9 GMX III,
OS-9 GMX II,
UniFLEX,
OS 9 GMX I,
FLEX
and a wide variety ot languages
and development software
Whatever your application software
development instrumentation, process
control, educational, scientific or business,
whether you need single or multi-user
capabilities. GIMIX has hardware and the
operabng systems to get the Job done
reliably
Please phone or write il you need further information
1337 WEST 37th PLACE • CHICAGO, ILLINOIS 60609 • (312) 927-5510 # TWX 910 221-4055
1983 amiXlne
C.R1.
Color Micro Journal
'68 1 Micro Journal
Dala-Comp
S E, Media
For Ordering Call
(615)842-4600
FROM - DATA-COMP,
A Familv of 100% 68XX Support Facilities
The Folks who FIRST Put FLEX'" on
The CoCo
Now Offering ♦FLEX 1 " (2 Versions)
AND 'STAR-DOS PLUS+ "
«-«
^ o**
m
STAR-DOS PLUS +
• Functions Same as FLEX
• Reads - wiites FLEX Disks
• Run FLEX Programs
• Just type: Run "STAR-DOS"
• Over 300 utilities & programs
to choose from.
V^
TSC Editor
Reg $50 00
NOW $*S BO
PLUS
ALL VERSIONS OF FLEX & STAR-DOS* INCLUDE
+ Read Write- Dir RS Disk + External Terminal Program
+ Run RS Basic from Both
+ More Free Utilities
+ Many Many More!!!
+ Test Disk Program
+ Disk Examine & Repair Program
+ Memoi*y Examine Program
TSC Assembler
Rr% tSOOO
NOW $35.00
CoCo Disk Drive System!
NEW L0MER PRICES ON PAX #S, AND PBIiTEJtS
THESE PACKAGES INCLUDE DRIVE. 'CONTROLLER.
POWER SUPPLY i CABINET. CABLE, AND MANUAL.
• SPECIFY MNAT CONTROLLER TOD MANT JJM. OR RADIO SIAJX.
Ptf #1 - i SINGLE SIOEO. DOUBLE OENSITT SYS. $349.95
PAI If - 2 SINGLE SIOEO. DOUBLE OENSITY SYS. 1639,95
PA* 1$ 1 0008 LE SIOEO. DOUBLE OENSITY SYS. $439.95
PM H - 2 DOUBLE SIOEO, DOUBLE OENSITY SYS. 1699.95
PAI H - 2 DOUBLE SIOEO. 0QU8LE OENSITY SYS.
THINLINE ORIYES, HALF SIZE M99.9B
Controllers
J*M DISK CONTROLLER */ JOOS OR RADIO SHACK
OISK BASIC. SPECIFY MHAT DISK BASIC. $134,95
RADIO SNACK OISK CONTROLLER 1.1 $134.95
64* UPGRADE tf/HOD. INSTRUCT IGN5,
C>0,E.F. AND COCO 2
HJL KEY80AR0S
MICRO TECH LONER CASE ROM ADAPTER
RADIO SHACK BASIC 1.2
RADIO SHACK OISK BASIC 1.1
OISK ORIVE CABINET i POMER SUPPLY
SINGLE SIOEO. DOUBLE OENSITY S" OISK ORIVE
DOUBLE SIOEO. DOUBLE OENSITY 5" OISK ORIVE
Printers
EPSON RX-60
EPSON RK-80FT
EPSON MX- 100
EPSON FX-100
EPSON FX-80
EPSON MX-70
Hsk Drive Cables
CABLE FOR ONE DRIVE
CABLE FOR TWO DRIVES
$ 44.95
$ 74.95
$ 74.95
$ 24.95
$ 24.95
$ 49.95
S199.95
S249.95
$269.00
$369.00
$499.00
$799.00
$549.00
$200.00
$ 19.95
$ 24.95
DATA-COMP
5900 Cassandra Smith Rd.
Hixson. TN 37343
CO
SHIPPIN6
USA ADD 2X
f OHCI6N ADD 5*
MIM $2.50
*2?
(615)842-4600
TELEX 55* BIB PVT BTM
00
68 Micro Journal
ISSN 0194-5025
5900 Cassandra Smith Rd
Hixson, TN 37343
Second Class Postage Paid
Ai Hixsoi*. TN
And Additional Mailing Otfiaas
Advanced typing at
text editing
capability.
ROYAL Beta 9000D
Electronic Memory
Typewriter with Display
The perfect combination. . .advanced electronic typing
and text editing capability. The ROYAL Beta 9000 D
features an easily accessed 2500 character phrase
memory that lets you recall names, addresses and com-
monly used phrases at the touch of a key, a user-f nendly
20-character display for ease of operation, 500 charac-
ter lift-off correction memory, triple pitch, and much,
much more. The Beta 9000D is also computer inter*
faceable via ROYAL'S optional IF600 Interface Box with
4K memory. Use it as a sophisticated memoiy type-
wnter or as a letter quality computer pnnter. Either way,
the ROYAL Beta 9000D delivers professional perfor-
mance. See the Beta 90000 at
Ltttir Qoalitg 9 CPS
Dual Pitch Daisij Whaal
J™
ijyjn+%.. _
ROYAL Beta 8200C
Professional Portable
Electronic Typewriter —
Built-in Centronics Interface
The ROYAL Beta 82O0C ofi'ers advanced electronic
typing performance . . wrth 2-fine lift off Correction
Memory. Triple Pitch, 1 1 1 -Character Keyboard wrth In-
ternational Language. Math. Legal and Business Sym-
bols. Automatic Indent. Center, Return, Oecimal Tab
and much, much more The ROYAL Beta B200C also
features a built-in Centronics Parallel computer inter
face with 2K memoiy Use it as a typewriter or as a letter
quality computer pnnter Either way. you get advanced
peilormance and ROYAL value See the Beta 8200C in
action at
mtmnmnitiummuiummmmm
Btti 9000 $ 599.95
BiU 6200 C $ 199.95
Utlmnastar $ 239.95
Off icunulir 2000 $ 199 95
Ltlltr Qnalitg 20 CPS
Doil Pilch Daiig Wfatil
DATA-COMP
590# Cassandra Smith Rd
Hixson. TN 37343
CO
SHIPPING
USA ADD ?*
FOREIGN ADD S*
(615)842-4600
TELEX 55$ 414 fVT MH